We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b3b44d commit 70ef28fCopy full SHA for 70ef28f
1 file changed
class/Utility.php
@@ -145,10 +145,9 @@ public static function detectLang()
145
146
if (empty($lang) && !empty($HTTP_ACCEPT_LANGUAGE)) {
147
$accepted = explode(',', $HTTP_ACCEPT_LANGUAGE);
148
- $acceptedCnt = count($accepted);
149
reset($accepted);
150
- for ($i = 0; $i < $acceptedCnt; ++$i) {
151
- $lang = static::langDetect($accepted[$i], 1);
+ foreach ($accepted as $iValue) {
+ $lang = static::langDetect($iValue, 1);
152
if (strncasecmp($lang, 'en', 2)) {
153
break;
154
}
0 commit comments