Skip to content

Commit 61b8de4

Browse files
bug #58661 [Cache] Initialize RedisAdapter cursor to 0 (thomas-hiron)
This PR was submitted for the 7.1 branch but it was merged into the 5.4 branch instead. Discussion ---------- [Cache] Initialize RedisAdapter cursor to 0 | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #58660 | License | MIT See #58660 for details and reproducer. Commits ------- 99a7160 initialize RedisAdapter cursor to 0
2 parents ee6d61b + 99a7160 commit 61b8de4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Cache/Traits/RedisTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ protected function doClear(string $namespace)
490490
continue;
491491
}
492492

493-
$cursor = null;
493+
$cursor = 0;
494494
do {
495495
$keys = $host instanceof \Predis\ClientInterface ? $host->scan($cursor, 'MATCH', $pattern, 'COUNT', 1000) : $host->scan($cursor, $pattern, 1000);
496496
if (isset($keys[1]) && \is_array($keys[1])) {

0 commit comments

Comments
 (0)