diff --git a/src/Kdyby/Redis/RedisStorage.php b/src/Kdyby/Redis/RedisStorage.php index a905e2f..2e74119 100644 --- a/src/Kdyby/Redis/RedisStorage.php +++ b/src/Kdyby/Redis/RedisStorage.php @@ -379,8 +379,18 @@ private static function getUnserializedValue($stored) if (empty($stored[0][self::META_SERIALIZED])) { return $stored[1]; - } else { - return @unserialize($stored[1]); // intentionally @ + } + try { + $value = @unserialize($stored[1]); // intentionally @ + if ($value === FALSE && $stored[1] !== serialize(FALSE)) { + return NULL; + } + + return $value; + } catch (\Throwable $e) { + return NULL; + } catch (\Exception $e) { + return NULL; } }