فهرست منبع

[GENERIC] Zend_File:

- fix new fileinfo extension sending additional infos
  (instead of image/jpeg it sends image/jpeg; charset=binary)

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@17192 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas 16 سال پیش
والد
کامیت
49e8d9d708
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      library/Zend/File/Transfer/Adapter/Abstract.php

+ 6 - 0
library/Zend/File/Transfer/Adapter/Abstract.php

@@ -1245,6 +1245,12 @@ abstract class Zend_File_Transfer_Adapter_Abstract
                 require_once 'Zend/File/Transfer/Exception.php';
                 throw new Zend_File_Transfer_Exception("The mimetype of file '{$value['name']}' could not been detected");
             }
+
+            // delete additional info
+            $pos = strpos($result[$key], ';');
+            if ($pos !== false) {
+                $result[$key] = substr($result[$key], 0, $pos);
+            }
         }
 
         if (count($result) == 1) {