diff --git a/src/Illuminate/Cache/RedisStore.php b/src/Illuminate/Cache/RedisStore.php index d7972768fe4f..6e698366dcd5 100755 --- a/src/Illuminate/Cache/RedisStore.php +++ b/src/Illuminate/Cache/RedisStore.php @@ -330,11 +330,17 @@ protected function currentTags($chunkSize = 1000) $cursor = $defaultCursorValue; do { - [$cursor, $tagsChunk] = $connection->scan( + $scanResult = $connection->scan( $cursor, ['match' => $prefix.'tag:*:entries', 'count' => $chunkSize] ); + if (! is_array($scanResult)) { + break; + } + + [$cursor, $tagsChunk] = $scanResult; + if (! is_array($tagsChunk)) { break; }