From 771a57a0a3cb553a59d9057bffcb6c55f2d19534 Mon Sep 17 00:00:00 2001 From: neznaika0 Date: Thu, 5 Dec 2024 21:37:16 +0300 Subject: [PATCH] fix: Check predis response --- system/Cache/Handlers/PredisHandler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/Cache/Handlers/PredisHandler.php b/system/Cache/Handlers/PredisHandler.php index 64b1427f7c64..fc0185033d64 100644 --- a/system/Cache/Handlers/PredisHandler.php +++ b/system/Cache/Handlers/PredisHandler.php @@ -19,6 +19,7 @@ use Exception; use Predis\Client; use Predis\Collection\Iterator\Keyspace; +use Predis\Response\Status; /** * Predis cache handler @@ -121,7 +122,7 @@ public function save(string $key, $value, int $ttl = 60) return false; } - if ($this->redis->hmset($key, ['__ci_type' => $dataType, '__ci_value' => $value]) !== 'OK') { + if (! $this->redis->hmset($key, ['__ci_type' => $dataType, '__ci_value' => $value]) instanceof Status) { return false; }