From 9bd6baefaee3a3e9b8dfe6427404512c9a66c969 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Fri, 26 Jun 2020 04:23:47 +0100 Subject: Tests: fixed opcache detection. opcache_get_status() returns array, so square brackets should be used to access "opcache_enabled" value. --- test/php/cwd/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/php/cwd/index.php b/test/php/cwd/index.php index 24ae3a21..de3797e4 100644 --- a/test/php/cwd/index.php +++ b/test/php/cwd/index.php @@ -10,7 +10,8 @@ if (isset($_GET['chdir']) && $_GET['chdir'] != "") { $opcache = -1; if (function_exists('opcache_get_status')) { - $opcache = opcache_get_status()->opcache_enabled; + $status = opcache_get_status(); + $opcache = $status['opcache_enabled']; } header('X-OPcache: ' . $opcache); -- cgit