Issues

ZF-6406: Zend_File_Transfer_Adapter_Http does not remove Rename filter correctly in receive()

Issue Type: Bug Created: 2009-04-24T00:35:18.000+0000 Last Updated: 2009-04-25T06:57:26.000+0000 Status: Resolved Fix version(s): - 1.8.0 (30/Apr/09)

Reporter: Jan Sorgalla (jsorgalla) Assignee: Thomas Weidner (thomas) Tags: - Zend_File_Transfer

Related issues: Attachments:

Description

Zend_File_Transfer_Adapter_Http does not remove Rename filter correctly in receive().

Patch:

<pre class="highlight">
Index: library/Zend/File/Transfer/Adapter/Http.php
===================================================================
--- library/Zend/File/Transfer/Adapter/Http.php
+++ library/Zend/File/Transfer/Adapter/Http.php
@@ -161,7 +161,7 @@
                 $rename   = $this->getFilter('Rename');
                 if ($rename !== null) {
                     $filename = $rename->getNewName($content['tmp_name']);
-                    $key      = array_search('Rename', $this->_files[$file]['filters']);
+                    $key      = array_search(get_class($rename), $this->_files[$file]['filters']);
                     unset($this->_files[$file]['filters'][$key]);
                 }

As a side effect, since array_search() returns false, the filter at offset 0 in $this->_files[$file]['filters'] will be removed.

Comments

No comments to display

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts