Make sure to always return the correct type from the Memcached->getMultiple call

This commit is contained in:
Timothy Warren 2017-03-01 11:42:42 -05:00
parent 29556b4fdf
commit 0aa750e2c6
2 changed files with 3 additions and 7 deletions

View File

@ -142,12 +142,7 @@ class ApcuDriver extends AbstractDriver {
*/
public function flush(): bool
{
if (function_exists('apcu_clear_cache'))
{
return apcu_clear_cache();
}
return TRUE;
return apcu_clear_cache();
}
/**

View File

@ -101,7 +101,8 @@ class MemcachedDriver extends AbstractDriver {
*/
public function getMultiple(array $keys = []): array
{
return $this->conn->getMulti($keys);
$return = $this->conn->getMulti($keys);
return ($return === FALSE) ? [] : $return;
}
/**