Skip to content

Commit

Permalink
fix: Check predis response
Browse files Browse the repository at this point in the history
  • Loading branch information
neznaika0 committed Dec 5, 2024
1 parent 4fbbe07 commit f6bb767
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion system/Cache/Handlers/PredisHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Exception;
use Predis\Client;
use Predis\Collection\Iterator\Keyspace;
use Predis\Response\Status;

/**
* Predis cache handler
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit f6bb767

Please sign in to comment.