From: Marcel Werk Date: Fri, 31 Jan 2020 17:26:35 +0000 (+0100) Subject: Use function_exists to check for disabled functions X-Git-Tag: 5.2.2~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c0b2053dd5796404220cd8c954fc8a93785f1584;p=GitHub%2FWoltLab%2FWCF.git Use function_exists to check for disabled functions --- diff --git a/wcfsetup/test.php b/wcfsetup/test.php index a2bf23784e..394d4d68c5 100644 --- a/wcfsetup/test.php +++ b/wcfsetup/test.php @@ -354,8 +354,7 @@ function checkInstallFile() { } function checkOpcache() { if (extension_loaded('Zend Opcache') && @ini_get('opcache.enable')) { - $disabledFunctions = explode(',', @ini_get('disable_functions')); - if (in_array('opcache_reset', $disabledFunctions) || in_array('opcache_invalidate', $disabledFunctions)) { + if (!function_exists('\opcache_reset') || !function_exists('\opcache_invalidate')) { return false; } }