Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/Symfony/Component/Lock/Store/RedisStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ public function exists(Key $key)
private function evaluate(string $script, string $resource, array $args)
{
if (
$this->redis instanceof \Redis ||
$this->redis instanceof \RedisCluster ||
$this->redis instanceof RedisProxy ||
$this->redis instanceof RedisClusterProxy
$this->redis instanceof \Redis
|| $this->redis instanceof \RedisCluster
|| $this->redis instanceof RedisProxy
|| $this->redis instanceof RedisClusterProxy
) {
$this->redis->clearLastError();
$result = $this->redis->eval($script, array_merge([$resource], $args), 1);
Expand Down Expand Up @@ -317,7 +317,9 @@ private function getNowCode(): string
try {
$this->supportTime = 1 === $this->evaluate($script, 'symfony_check_support_time', []);
} catch (LockStorageException $e) {
if (false === strpos($e->getMessage(), 'commands not allowed after non deterministic')) {
if (!str_contains($e->getMessage(), 'commands not allowed after non deterministic')
&& !str_contains($e->getMessage(), 'is not allowed from script script')
) {
throw $e;
}
$this->supportTime = false;
Expand Down