Skip to content

Commit

Permalink
Fix the fix for #170 (missing unserialize)
Browse files Browse the repository at this point in the history
  • Loading branch information
xfra35 committed Nov 18, 2016
1 parent ce6c049 commit d4723af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base.php
Original file line number Diff line number Diff line change
Expand Up @@ -2504,6 +2504,7 @@ function reset($suffix=NULL,$lifetime=0) {
}
return TRUE;
case 'memcache':
$fw=Base::instance();
foreach (memcache_get_extended_stats(
$this->ref,'slabs') as $slabs)
foreach (array_filter(array_keys($slabs),'is_numeric')
Expand All @@ -2513,7 +2514,7 @@ function reset($suffix=NULL,$lifetime=0) {
if (is_array($data))
foreach (array_keys($data) as $key)
if (preg_match($regex,$key) &&
($val=memcache_get($this->ref,$key)) &&
($val=$fw->unserialize(memcache_get($this->ref,$key))) &&
$val[1]+$lifetime<time())
memcache_delete($this->ref,$key);
return TRUE;
Expand Down

0 comments on commit d4723af

Please sign in to comment.