Skip to content

Commit 3562829

Browse files
committed
Fix ini_get() for boolean values
1 parent 96302e3 commit 3562829

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Command/AboutCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
8484
array('Architecture', (PHP_INT_SIZE * 8).' bits'),
8585
array('Intl locale', class_exists('Locale', false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a'),
8686
array('Timezone', date_default_timezone_get().' (<comment>'.(new \DateTime())->format(\DateTime::W3C).'</>)'),
87-
array('OPcache', \extension_loaded('Zend OPcache') && ini_get('opcache.enable') ? 'true' : 'false'),
88-
array('APCu', \extension_loaded('apcu') && ini_get('apc.enabled') ? 'true' : 'false'),
87+
array('OPcache', \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'),
88+
array('APCu', \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'),
8989
array('Xdebug', \extension_loaded('xdebug') ? 'true' : 'false'),
9090
);
9191

0 commit comments

Comments
 (0)