Skip to content

Commit c0367c2

Browse files
authored
Update LocalePlugin.php (#1128)
Fix handleQuery() : check if $query->getLocale() is empty!
1 parent 8e2f7ad commit c0367c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Plugin/Plugin/LocalePlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct(string $locale)
4141
public function handleQuery(Query $query, callable $next, callable $first)
4242
{
4343
$locale = $query->getLocale();
44-
if (null !== $locale && '' !== $locale) {
44+
if (null === $locale || '' === $locale) {
4545
$query = $query->withLocale($this->locale);
4646
}
4747

0 commit comments

Comments
 (0)