Skip to content

Commit 570dd07

Browse files
committed
Merge pull request #94 from LExpress/apcu
Makes sfAPCCache compatible with APCu
2 parents 940aa2b + cbf0fc0 commit 570dd07

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/cache/sfAPCCache.class.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,12 @@ protected function getCacheInfo($key)
197197

198198
if (is_array($infos['cache_list']))
199199
{
200+
// Compatibility with APCu PHP 5.5+
201+
$infoKey = extension_loaded('apcu') ? 'key' : 'info';
202+
200203
foreach ($infos['cache_list'] as $info)
201204
{
202-
if ($this->getOption('prefix').$key == $info['info'])
205+
if ($this->getOption('prefix').$key == $info[$infoKey])
203206
{
204207
return $info;
205208
}

0 commit comments

Comments
 (0)