diff --git a/src/Symfony/Component/Lock/Store/RedisStore.php b/src/Symfony/Component/Lock/Store/RedisStore.php index f2d8a5e9766fb..3ff1de6fa5171 100644 --- a/src/Symfony/Component/Lock/Store/RedisStore.php +++ b/src/Symfony/Component/Lock/Store/RedisStore.php @@ -264,7 +264,7 @@ private function evaluate(string $script, string $resource, array $args): mixed $client = $this->redis->_instance($this->redis->_target($resource)); $client->clearLastError(); $result = $client->evalSha($scriptSha, array_merge([$resource], $args), 1); - if (null !== ($err = $this->redis->getLastError()) && str_starts_with($err, self::NO_SCRIPT_ERROR_MESSAGE_PREFIX)) { + if (null !== ($err = $client->getLastError()) && str_starts_with($err, self::NO_SCRIPT_ERROR_MESSAGE_PREFIX)) { $client->clearLastError(); $client->script('LOAD', $script);