From 99a7160d568f9c844282cc2f4cc4bbc68bc2d987 Mon Sep 17 00:00:00 2001 From: Thomas Hiron Date: Fri, 25 Oct 2024 10:19:29 +0200 Subject: [PATCH] initialize RedisAdapter cursor to 0 --- src/Symfony/Component/Cache/Traits/RedisTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php index 126f568112d3a..ea07acf08ac42 100644 --- a/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -490,7 +490,7 @@ protected function doClear(string $namespace) continue; } - $cursor = null; + $cursor = 0; do { $keys = $host instanceof \Predis\ClientInterface ? $host->scan($cursor, 'MATCH', $pattern, 'COUNT', 1000) : $host->scan($cursor, $pattern, 1000); if (isset($keys[1]) && \is_array($keys[1])) {