Use function_exists to check for disabled functions
authorMarcel Werk <burntime@woltlab.com>
Fri, 31 Jan 2020 17:26:35 +0000 (18:26 +0100)
committerMarcel Werk <burntime@woltlab.com>
Fri, 31 Jan 2020 17:26:35 +0000 (18:26 +0100)
wcfsetup/test.php

index a2bf23784eb300d919f305b24b780e97c22a1ea3..394d4d68c570954f40273e448d5c2905b6d7abd1 100644 (file)
@@ -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;
                }
        }