[Cache] Make sure we get the correct number of values from redis::mget()

This commit is contained in:
Emanuele Panzeri 2019-11-27 17:54:05 +01:00 committed by Nicolas Grekas
parent ed101fb75f
commit 685c36c3d2

View File

@ -179,7 +179,13 @@ trait RedisTrait
}
});
} else {
$values = array_combine($ids, $this->redis->mget($ids));
$values = $this->redis->mget($ids);
if (!\is_array($values) || \count($values) !== \count($ids)) {
return [];
}
$values = array_combine($ids, $values);
}
foreach ($values as $id => $v) {