mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 20:49:08 +01:00
fix "PHP Fatal error: APCuIterator::__construct(): APC must be enabled to use" in setup-cli
This commit is contained in:
parent
0dce66e4a0
commit
a2439dec02
@ -151,6 +151,11 @@ class Apcu extends Base implements Provider
|
|||||||
*/
|
*/
|
||||||
function flush(array $keys)
|
function flush(array $keys)
|
||||||
{
|
{
|
||||||
|
// do NOT try instanciating APCuIterator, if APCu is not enabled, as it gives a PHP Fatal Error
|
||||||
|
if (!ini_get('apc.enabled') || php_sapi_name() === 'cli' && !ini_get('apc.cli_enabled'))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!$keys && function_exists('apcu_clear_cache'))
|
if (!$keys && function_exists('apcu_clear_cache'))
|
||||||
{
|
{
|
||||||
apcu_clear_cache();
|
apcu_clear_cache();
|
||||||
|
Loading…
Reference in New Issue
Block a user