diff --git a/library/think/cache/driver/Redis.php b/library/think/cache/driver/Redis.php index b3002c1e..90da6551 100644 --- a/library/think/cache/driver/Redis.php +++ b/library/think/cache/driver/Redis.php @@ -84,7 +84,13 @@ class Redis extends Driver return $default; } - return unserialize($value); + try { + $result = unserialize($value); + } catch (\Exception $e) { + $result = $default; + } + + return $result; } /**