Make sure to always return the correct type from the Memcached->getMultiple call
This commit is contained in:
parent
29556b4fdf
commit
0aa750e2c6
@ -141,15 +141,10 @@ class ApcuDriver extends AbstractDriver {
|
|||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function flush(): bool
|
public function flush(): bool
|
||||||
{
|
|
||||||
if (function_exists('apcu_clear_cache'))
|
|
||||||
{
|
{
|
||||||
return apcu_clear_cache();
|
return apcu_clear_cache();
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the specified key to expire at the given time
|
* Set the specified key to expire at the given time
|
||||||
*
|
*
|
||||||
|
@ -101,7 +101,8 @@ class MemcachedDriver extends AbstractDriver {
|
|||||||
*/
|
*/
|
||||||
public function getMultiple(array $keys = []): array
|
public function getMultiple(array $keys = []): array
|
||||||
{
|
{
|
||||||
return $this->conn->getMulti($keys);
|
$return = $this->conn->getMulti($keys);
|
||||||
|
return ($return === FALSE) ? [] : $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user