Skip to content

Commit f77d144

Browse files
committed
fix: Check predis response
1 parent f2fe526 commit f77d144

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

system/Cache/Handlers/PredisHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Exception;
2020
use Predis\Client;
2121
use Predis\Collection\Iterator\Keyspace;
22+
use Predis\Response\Status;
2223

2324
/**
2425
* Predis cache handler
@@ -121,7 +122,7 @@ public function save(string $key, $value, int $ttl = 60)
121122
return false;
122123
}
123124

124-
if ($this->redis->hmset($key, ['__ci_type' => $dataType, '__ci_value' => $value]) !== 'OK') {
125+
if (! $this->redis->hmset($key, ['__ci_type' => $dataType, '__ci_value' => $value]) instanceof Status) {
125126
return false;
126127
}
127128

0 commit comments

Comments
 (0)