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 11, 2024
1 parent 49cba01 commit 771a57a
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 771a57a

Please sign in to comment.