Skip to content

Commit f276579

Browse files
Tantrissesteevanb
authored andcommitted
Fix opcache check returning false when opcache is disabled
1 parent 19d1a62 commit f276579

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

templates/public/statistics.php.twig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
require('{{ entryPointPath }}');
44
55
$opcacheStatus = function_exists('opcache_get_status') ? opcache_get_status() : [];
6+
$opcacheStatus = is_array($opcacheStatus) ? $opcacheStatus : [];
7+
68
if (array_key_exists('preload_statistics', $opcacheStatus) === true) {
79
$preloadMemory = $opcacheStatus['preload_statistics']['memory_consumption'];
810
$preloadFiles = count($opcacheStatus['preload_statistics']['scripts']);

0 commit comments

Comments
 (0)