8000 bug #58753 [Cache] Fix clear() when using Predis (nicolas-grekas) · symfony/symfony@5ebc4c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5ebc4c3

Browse files
bug #58753 [Cache] Fix clear() when using Predis (nicolas-grekas)
This PR was merged into the 5.4 branch. Discussion ---------- [Cache] Fix clear() when using Predis | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #58660 | License | MIT Commits ------- fc796de [Cache] Fix clear() when using Predis
2 parents e37bdf0 + fc796de commit 5ebc4c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ protected function doClear(string $namespace)
492492

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

0 commit comments

Comments
 (0)
0