Issue #2332427 by neclimdul: Fixed APCUBackend makes incorrect assumptions about apc_fetch return type.
parent
ea561c1082
commit
f98fd49d73
|
@ -109,10 +109,12 @@ class ApcuBackend implements CacheBackendInterface {
|
||||||
|
|
||||||
$result = apc_fetch(array_keys($map));
|
$result = apc_fetch(array_keys($map));
|
||||||
$cache = array();
|
$cache = array();
|
||||||
foreach ($result as $key => $item) {
|
if ($result) {
|
||||||
$item = $this->prepareItem($item, $allow_invalid);
|
foreach ($result as $key => $item) {
|
||||||
if ($item) {
|
$item = $this->prepareItem($item, $allow_invalid);
|
||||||
$cache[$map[$key]] = $item;
|
if ($item) {
|
||||||
|
$cache[$map[$key]] = $item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($result);
|
unset($result);
|
||||||
|
@ -358,8 +360,10 @@ class ApcuBackend implements CacheBackendInterface {
|
||||||
foreach (array('deletions', 'invalidations') as $type) {
|
foreach (array('deletions', 'invalidations') as $type) {
|
||||||
if ($query_tags[$type]) {
|
if ($query_tags[$type]) {
|
||||||
$result = apc_fetch($query_tags[$type]);
|
$result = apc_fetch($query_tags[$type]);
|
||||||
static::$tagCache[$type] = array_merge(static::$tagCache[$type], $result);
|
if ($result) {
|
||||||
$checksum[$type] += array_sum($result);
|
static::$tagCache[$type] = array_merge(static::$tagCache[$type], $result);
|
||||||
|
$checksum[$type] += array_sum($result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue