Skip to content

Commit ad0caee

Browse files
bug #54776 [Cache] fix: remove unwanted cast to int (Arend Hummeling)
This PR was merged into the 5.4 branch. Discussion ---------- [Cache] fix: remove unwanted cast to int | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? |no | Issues | Fix #54773 | License | MIT As discussed in the related issue, this type cast is unnecessary and can lead to unexpected behavior due to integer overflow. I took a quick look if a testcase could be implemented, but this is not so trivial, as we'd either have to somehow configure a redis server to end up with a state that results in very high scan cursor values, or we'd have to implement a mock for the redis implementation, so we can provide all the edge case values for our tests. Commits ------- 3d174a9 fix: remove unwanted type cast
2 parents b4f9da4 + 3d174a9 commit ad0caee

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
@@ -499,7 +499,7 @@ protected function doClear(string $namespace)
499499
}
500500
$this->doDelete($keys);
501501
}
502-
} while ($cursor = (int) $cursor);
502+
} while ($cursor);
503503
}
504504

505505
return $cleared;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy