Elide "; charset=binary" which can be returned from file::mime() from recent versions of finfo. See http://framework.zend.com/issues/browse/ZF-9383 for details. Fixes ticket #1230.

This commit is contained in:
Bharat Mediratta
2010-07-20 13:47:11 -07:00
parent b4b2ef92ae
commit 3136121989

View File

@@ -135,6 +135,10 @@ class Form_Upload_Core extends Form_Input {
$mime = $this->upload['type'];
}
// Get rid of the ";charset=binary" that can occasionally occur and is
// legal via RFC2045
$mime = preg_replace('/; charset=binary/', '', $mime);
// Allow nothing by default
$allow = FALSE;