diff options
author | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2024-11-17 12:57:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-17 12:57:09 +0100 |
commit | 2db73873b529efcaad1abf76e6a366e697b95231 (patch) | |
tree | 0c3771c9590eae965bbc7d85e0fe4ed06a919ab8 | |
parent | 5c09a9d138178f5650770173bf778209b1fd36e6 (diff) | |
download | nextcloud-server-clearKeysInBatches.tar.gz nextcloud-server-clearKeysInBatches.zip |
fix: return false on empty scanclearKeysInBatches
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
-rw-r--r-- | lib/private/Memcache/Redis.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Memcache/Redis.php b/lib/private/Memcache/Redis.php index aa38e6cefa4..f87cc8ab1f1 100644 --- a/lib/private/Memcache/Redis.php +++ b/lib/private/Memcache/Redis.php @@ -94,7 +94,12 @@ class Redis extends Cache implements IMemcacheTTL { // Use SCAN to iterate over keys $cursor = 0; do { - [$cursor, $keys] = $cache->scan($cursor, $prefix); + $arr_keys = $cache->scan($cursor, $prefix); + if ($arr_keys === false) { + return false; + } + + [$cursor, $keys] = $arr_keys; if (!empty($keys)) { $deletedCount += $cache->unlink($keys); } |