We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f925065 commit 19786a7Copy full SHA for 19786a7
src/LangChooser.php
@@ -97,7 +97,7 @@ public function chooseCode(
97
// The language part is either a code or a code with a quality
98
// We cannot do anything with a * code, so it is skipped
99
// If the quality is missing, it is assumed to be 1 according to the RFC
100
- if (preg_match("!([a-z-]+)(;q=([0-9\\.]+))?!", trim($value), $found)) {
+ if (preg_match("!([a-z-]+)(;q=([0-9\\.]+))?!", strtolower(trim($value)), $found)) {
101
$quality = (isset($found[3]) ? (float) $found[3] : 1.0);
102
$browser_langs[] = [$found[1], $quality];
103
}
0 commit comments