diff options
author | Andrey Andreev <narf@devilix.net> | 2016-02-04 14:04:35 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-02-04 14:04:35 +0100 |
commit | 71d64cbcfde625606ffb55867e0bb547123ef22f (patch) | |
tree | d8e8a2bbb992cccd2445d1e366d70cb46371b6c9 /system | |
parent | ec9e96eb09caa9d024c89a8bdb1b00bf6540278a (diff) |
Fix #4430
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Upload.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 15caebebe..f2418378b 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -526,6 +526,12 @@ class CI_Upload { $this->file_name = preg_replace('/\s+/', '_', $this->file_name); } + if ($this->file_ext_tolower && ($ext_length = strlen($this->file_ext))) + { + // file_ext was previously lower-cased by a get_extension() call + $this->file_name = substr($this->file_name, 0, -$ext_length).$this->file_ext; + } + /* * Validate the file name * This function appends an number onto the end of |