mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-24 02:01:30 +02:00
bugfix(redis-storage): Unserialise is sometimes false (#773)
This is likely indicative of a deeper issue with the data being fetched but when there is a problem with unserialize, we should fallback to an empty array when the unserialize function returns false.
This commit is contained in:
@@ -46,7 +46,7 @@ class RedisStorage implements StorageInterface
|
|||||||
*/
|
*/
|
||||||
public function get($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
return array_merge(unserialize($this->redis->hGet("$this->hash:data", $id)),
|
return array_merge(unserialize($this->redis->hGet("$this->hash:data", $id)) ?: [],
|
||||||
array('__meta' => unserialize($this->redis->hGet("$this->hash:meta", $id))));
|
array('__meta' => unserialize($this->redis->hGet("$this->hash:meta", $id))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user