We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9789cd9 commit 09ec933Copy full SHA for 09ec933
src/Detectors/UrlDetector.php
@@ -25,9 +25,11 @@ public function detect()
25
}
26
27
// Find the locale that belongs to the custom domain or slug.
28
+ // Return the original slug as fallback.
29
+ // The calling code should validate and handle it.
30
$domain = Request::getHttpHost();
31
$locales = $this->flipLocalesArray($locales);
- $locale = $locales[$domain] ?? $locales[$slug] ?? null;
32
+ $locale = $locales[$domain] ?? $locales[$slug] ?? $slug;
33
34
return $locale;
35
0 commit comments