summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortubalmartin <tubalmartin@gmail.com>2012-03-03 22:24:31 +0100
committertubalmartin <tubalmartin@gmail.com>2012-03-03 22:24:31 +0100
commit010f1f4b315c8f5aef2e0b4c6571e4c4752f56c6 (patch)
treed1ddd6f0327f8063dd2c825b285ae8004f6689e9
parent1887c6d4847fd9d4251b58aba599cb8ee63d2e38 (diff)
Fixed a bug - CI_Upload::_file_mime_type() could've failed if popen() is used for the detection.
-rw-r--r--system/libraries/Upload.php2
-rw-r--r--user_guide/changelog.html1
2 files changed, 2 insertions, 1 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 91fbf66ca..b0490de30 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -1095,7 +1095,7 @@ class CI_Upload {
$proc = @popen($cmd, 'r');
if (is_resource($proc))
{
- $mime = @fread($test, 512);
+ $mime = @fread($proc, 512);
@pclose($proc);
if ($mime !== FALSE)
{
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index b87e61ba8..cf693685b 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -78,6 +78,7 @@ Change Log
<li>Fixed a bug (#697) - A wrong array key was used in the Upload library to check for mime-types.</li>
<li>Fixed a bug - form_open() compared $action against site_url() instead of base_url()</li>
<li>Fixed a bug - CI_Upload::_file_mime_type() could've failed if mime_content_type() is used for the detection and returns FALSE.</li>
+ <li>Fixed a bug - CI_Upload::_file_mime_type() could've failed if popen() is used for the detection.</li>
<li>Fixed a bug (#538) - Windows paths were ignored when using the <a href="libraries/image_lib.html">Image Manipulation Class</a> to create a new file.</li>
<li>Fixed a bug - When database caching was enabled, $this->db->query() checked the cache before binding variables which resulted in cached queries never being found.</li>
</ul>