File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
system/Commands/Utilities/Routes Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,12 @@ public function find(string $uri): array
51
51
{
52
52
$ this ->filters ->reset ();
53
53
54
- $ isLocaleExist = strpos ($ uri , '{locale} ' ) !== false ;
54
+ // Fix for the search filters command
55
+ $ isSupportedLocaleOnly = false ;
56
+
57
+ if (strpos ($ uri , '{locale} ' ) !== false && Services::routes ()->shouldUseSupportedLocalesOnly ()) {
58
+ $ isSupportedLocaleOnly = true ;
55
59
56
- if ($ isLocaleExist ) {
57
60
$ uri = str_replace ('{locale} ' , config (App::class)->defaultLocale , $ uri );
58
61
}
59
62
@@ -73,7 +76,7 @@ public function find(string $uri): array
73
76
74
77
$ filters = $ this ->filters ->getFilters ();
75
78
76
- if ($ isLocaleExist ) {
79
+ if ($ isSupportedLocaleOnly ) {
77
80
$ filters ['before ' ] = array_map (static fn ($ filter ) => '! ' . $ filter , $ filters ['before ' ]);
78
81
$ filters ['after ' ] = array_map (static fn ($ filter ) => '! ' . $ filter , $ filters ['after ' ]);
79
82
}
You can’t perform that action at this time.
0 commit comments