From 86f0f492a2a2cea4b0e4844a38e4b148d092f3ab Mon Sep 17 00:00:00 2001 From: HuanXiang Date: Wed, 11 Oct 2023 20:10:29 +0800 Subject: [PATCH] [10.x] Fixes cache:prune-stale-tags preg_match delimiter no escaped (#48702) When redis prefix has / delimiter will not escaped. The preg_match will Unknown modifier Exception --- src/Illuminate/Cache/RedisStore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Cache/RedisStore.php b/src/Illuminate/Cache/RedisStore.php index 437cee78136d..dbbeb40a4b5c 100755 --- a/src/Illuminate/Cache/RedisStore.php +++ b/src/Illuminate/Cache/RedisStore.php @@ -317,7 +317,7 @@ protected function currentTags($chunkSize = 1000) yield $tag; } } while (((string) $cursor) !== $defaultCursorValue); - })->map(fn (string $tagKey) => Str::match('/^'.preg_quote($prefix).'tag:(.*):entries$/', $tagKey)); + })->map(fn (string $tagKey) => Str::match('/^'.preg_quote($prefix, '/').'tag:(.*):entries$/', $tagKey)); } /**