diff --git a/lib/cache/sfAPCCache.class.php b/lib/cache/sfAPCCache.class.php index db1a150d9..168dd515a 100644 --- a/lib/cache/sfAPCCache.class.php +++ b/lib/cache/sfAPCCache.class.php @@ -197,9 +197,12 @@ protected function getCacheInfo($key) if (is_array($infos['cache_list'])) { + // Compatibility with APCu PHP 5.5+ + $infoKey = extension_loaded('apcu') ? 'key' : 'info'; + foreach ($infos['cache_list'] as $info) { - if ($this->getOption('prefix').$key == $info['info']) + if ($this->getOption('prefix').$key == $info[$infoKey]) { return $info; }