Skip to content

Commit 70ef28f

Browse files
committed
foreach
1 parent 8b3b44d commit 70ef28f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

class/Utility.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,9 @@ public static function detectLang()
145145

146146
if (empty($lang) && !empty($HTTP_ACCEPT_LANGUAGE)) {
147147
$accepted = explode(',', $HTTP_ACCEPT_LANGUAGE);
148-
$acceptedCnt = count($accepted);
149148
reset($accepted);
150-
for ($i = 0; $i < $acceptedCnt; ++$i) {
151-
$lang = static::langDetect($accepted[$i], 1);
149+
foreach ($accepted as $iValue) {
150+
$lang = static::langDetect($iValue, 1);
152151
if (strncasecmp($lang, 'en', 2)) {
153152
break;
154153
}

0 commit comments

Comments
 (0)