Fix undefined variable in cache ArrayTrait
This commit is contained in:
parent
0b99a8e28c
commit
b0b5937d1d
@ -124,7 +124,7 @@ class ArrayAdapter implements AdapterInterface, CacheInterface, LoggerAwareInter
|
||||
|
||||
return true;
|
||||
}
|
||||
if ($this->storeSerialized && null === $value = $this->freeze($value)) {
|
||||
if ($this->storeSerialized && null === $value = $this->freeze($value, $key)) {
|
||||
return false;
|
||||
}
|
||||
if (null === $expiry && 0 < $item["\0*\0defaultLifetime"]) {
|
||||
|
@ -129,7 +129,7 @@ class ArrayCache implements CacheInterface, LoggerAwareInterface, ResettableInte
|
||||
$expiry = 0 < $ttl ? microtime(true) + $ttl : PHP_INT_MAX;
|
||||
|
||||
foreach ($valuesArray as $key => $value) {
|
||||
if ($this->storeSerialized && null === $value = $this->freeze($value)) {
|
||||
if ($this->storeSerialized && null === $value = $this->freeze($value, $key)) {
|
||||
return false;
|
||||
}
|
||||
$this->values[$key] = $value;
|
||||
|
@ -113,7 +113,7 @@ trait ArrayTrait
|
||||
}
|
||||
}
|
||||
|
||||
private function freeze($value)
|
||||
private function freeze($value, $key)
|
||||
{
|
||||
if (null === $value) {
|
||||
return 'N;';
|
||||
|
Reference in New Issue
Block a user