diff options
author | Andrey Andreev <narf@devilix.net> | 2017-02-06 09:28:36 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2017-02-06 09:33:50 +0100 |
commit | d60e51ba3bc542ead57d9d7b3b5f11e5c26a72e4 (patch) | |
tree | 300619cbc822f8440be2e80acb0573a1fcf2f1f8 /system/core | |
parent | 422b8890e8b41a9ecf6644bff169c8c82fa2c82d (diff) |
Merge pull request #5006 from tianhe1986/develop_common
Fix two bugs with Common Functions
Diffstat (limited to 'system/core')
-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 8437f7926..8b74db0a3 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -319,17 +319,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')); } } @@ -719,6 +718,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 |