Skip to content

Commit 7d8c0c8

Browse files
committed
#37509 | Verification added to redis preloading to prevent array_combine receiving false as second argument
1 parent 44a86cb commit 7d8c0c8

File tree

1 file changed

+4
-1
lines changed
  • lib/internal/Magento/Framework/Cache/Backend

1 file changed

+4
-1
lines changed

lib/internal/Magento/Framework/Cache/Backend/Redis.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ public function load($id, $doNotTestCacheValidity = false)
5151
$redis->hGet(self::PREFIX_KEY . $key, self::FIELD_DATA);
5252
}
5353

54-
$this->preloadedData = array_filter(array_combine($this->preloadKeys, $redis->exec()));
54+
$redisResponse = $redis->exec();
55+
$this->preloadedData = $redisResponse ?
56+
array_filter(array_combine($this->preloadKeys, $redisResponse)) :
57+
[];
5558
}
5659

5760
if (isset($this->preloadedData[$id])) {

0 commit comments

Comments
 (0)