From 40e415ad2153e37f0457a341c9a68cc24a9b1505 Mon Sep 17 00:00:00 2001 From: Andrew Aitken-Fincham Date: Tue, 21 Nov 2017 12:46:08 +0000 Subject: [PATCH] BUGFIX check for apc.enable_cli if PHP_SAPI==cli --- src/Symfony/Component/Cache/Traits/ApcuTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Cache/Traits/ApcuTrait.php b/src/Symfony/Component/Cache/Traits/ApcuTrait.php index 5614b390cf2f4..5277ad2c6e78f 100644 --- a/src/Symfony/Component/Cache/Traits/ApcuTrait.php +++ b/src/Symfony/Component/Cache/Traits/ApcuTrait.php @@ -23,7 +23,7 @@ trait ApcuTrait { public static function isSupported() { - return function_exists('apcu_fetch') && ini_get('apc.enabled'); + return function_exists('apcu_fetch') && ini_get('cli' === PHP_SAPI ? 'apc.enable_cli' : 'apc.enabled'); } private function init($namespace, $defaultLifetime, $version)