From 47cd452c91a3dc7dab4a8285136bee2048fc7bba Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 22 Apr 2010 12:34:13 +0100 Subject: Fixed Upload bug that would break when files and images were both included on an allowed filetype list in the wrong order: http://codeigniter.com/bug_tracker/bug/11552/ --- system/libraries/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 3131469de..0e71aee6b 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -578,7 +578,7 @@ class CI_Upload { $mime = $this->mimes_types(strtolower($val)); // Images get some additional checks - if (in_array($val, $image_types)) + if ($this->file_ext == '.' . $val && in_array($val, $image_types)) { if (getimagesize($this->file_temp) === FALSE) { -- cgit v1.2.3-24-g4f1b