@@ -258,10 +258,10 @@ public function exists(Key $key)
258258 private function evaluate (string $ script , string $ resource , array $ args )
259259 {
260260 if (
261- $ this ->redis instanceof \Redis ||
262- $ this ->redis instanceof \RedisCluster ||
263- $ this ->redis instanceof RedisProxy ||
264- $ this ->redis instanceof RedisClusterProxy
261+ $ this ->redis instanceof \Redis
262+ || $ this ->redis instanceof \RedisCluster
263+ || $ this ->redis instanceof RedisProxy
264+ || $ this ->redis instanceof RedisClusterProxy
265265 ) {
266266 $ this ->redis ->clearLastError ();
267267 $ result = $ this ->redis ->eval ($ script , array_merge ([$ resource ], $ args ), 1 );
@@ -317,7 +317,9 @@ private function getNowCode(): string
317317 try {
318318 $ this ->supportTime = 1 === $ this ->evaluate ($ script , 'symfony_check_support_time ' , []);
319319 } catch (LockStorageException $ e ) {
320- if (false === strpos ($ e ->getMessage (), 'commands not allowed after non deterministic ' )) {
320+ if (!str_contains ($ e ->getMessage (), 'commands not allowed after non deterministic ' )
321+ && !str_contains ($ e ->getMessage (), 'is not allowed from script script ' )
322+ ) {
321323 throw $ e ;
322324 }
323325 $ this ->supportTime = false ;
0 commit comments