Tests: fixed opcache detection.

opcache_get_status() returns array, so square brackets
should be used to access "opcache_enabled" value.
This commit is contained in:
Andrei Zeliankou
2020-06-26 04:23:47 +01:00
parent 6e55f03dcd
commit 9bd6baefae

View File

@@ -10,7 +10,8 @@ if (isset($_GET['chdir']) && $_GET['chdir'] != "") {
$opcache = -1; $opcache = -1;
if (function_exists('opcache_get_status')) { if (function_exists('opcache_get_status')) {
$opcache = opcache_get_status()->opcache_enabled; $status = opcache_get_status();
$opcache = $status['opcache_enabled'];
} }
header('X-OPcache: ' . $opcache); header('X-OPcache: ' . $opcache);