diff options
author | Andrey Andreev <narf@devilix.net> | 2017-02-06 09:28:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-06 09:28:36 +0100 |
commit | 8128e61ae620804fec1ed64b377abf95f1bab297 (patch) | |
tree | e45f3ef1c0433d9d01353c1feb7906de296f3986 /system/core/Common.php | |
parent | 77db815a619864f8d2c59a4b02bac2f6fd6b3d69 (diff) | |
parent | b3c113f60a0343c3dbf16a3b6898270c698f45bb (diff) |
Merge pull request #5006 from tianhe1986/develop_common
Fix two bugs with Common Functions
Diffstat (limited to 'system/core/Common.php')
-rw-r--r-- | system/core/Common.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/system/core/Common.php b/system/core/Common.php index 5c6f88ef9..cef9f47e0 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -318,17 +318,16 @@ if ( ! function_exists('get_mimes')) if (empty($_mimes)) { - if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) - { - $_mimes = include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'); - } - elseif (file_exists(APPPATH.'config/mimes.php')) + $_mimes = array(); + + if (file_exists(APPPATH.'config/mimes.php')) { - $_mimes = include(APPPATH.'config/mimes.php'); + $_mimes = array_merge($_mimes, include(APPPATH.'config/mimes.php')); } - else + + if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) { - $_mimes = array(); + $_mimes = array_merge($_mimes, include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')); } } @@ -718,6 +717,7 @@ if ( ! function_exists('remove_invisible_characters')) { $non_displayables[] = '/%0[0-8bcef]/i'; // url encoded 00-08, 11, 12, 14, 15 $non_displayables[] = '/%1[0-9a-f]/i'; // url encoded 16-31 + $non_displayables[] = '/%7f/i'; // url encoded 127 } $non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127 |