diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-12-17 09:30:18 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-12-17 09:30:18 +0100 |
commit | ae6346228e4993367a72f272345325f1ddf93110 (patch) | |
tree | feeb3a232a628892fc91a644044a41e434a01209 /system | |
parent | 5e872505a06da30c4643b99643b39bd650d45093 (diff) |
Fix function_usable()
Diffstat (limited to 'system')
-rw-r--r-- | system/core/Common.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/system/core/Common.php b/system/core/Common.php index 7feb16bfd..c7ab387a3 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -681,17 +681,22 @@ if ( ! function_exists('function_usable')) { if ( ! isset($_suhosin_func_blacklist)) { - $_suhosin_func_blacklist = extension_loaded('suhosin') - ? array() - : explode(',', trim(@ini_get('suhosin.executor.func.blacklist'))); + if (extension_loaded('suhosin')) + { + $_suhosin_func_blacklist = explode(',', trim(@ini_get('suhosin.executor.func.blacklist'))); - if ( ! in_array('eval', $_suhosin_func_blacklist, TRUE) && @ini_get('suhosin.executor.disable_eval')) + if ( ! in_array('eval', $_suhosin_func_blacklist, TRUE) && @ini_get('suhosin.executor.disable_eval')) + { + $_suhosin_func_blacklist[] = 'eval'; + } + } + else { - $_suhosin_func_blacklist[] = 'eval'; + $_suhosin_func_blacklist = array(); } } - return in_array($function_name, $_suhosin_func_blacklist, TRUE); + return ! in_array($function_name, $_suhosin_func_blacklist, TRUE); } return FALSE; |