From 8807b6ba5ea28d1eb2fab0ed6170f596b6f14a24 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Sat, 11 Nov 2023 16:36:24 -0300 Subject: [PATCH] Check if Redis old TTL is integer --- src/SaveHandlers/RedisHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SaveHandlers/RedisHandler.php b/src/SaveHandlers/RedisHandler.php index d76a9ac..5be0802 100644 --- a/src/SaveHandlers/RedisHandler.php +++ b/src/SaveHandlers/RedisHandler.php @@ -239,7 +239,7 @@ protected function lock(string $id) : bool while ($attempt < $this->config['lock_attempts']) { $attempt++; $oldTtl = $this->redis->ttl($lockId); - if ($oldTtl > 0) { + if (\is_int($oldTtl) && $oldTtl > 0) { \usleep($this->config['lock_sleep']); continue; }