Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change while with foreach for performance.

  • Loading branch information...
commit 351993ce9f51b258a9c87c096f063276be4fc9cb 1 parent 0edfe24
@acidvertigo acidvertigo authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  catalog/includes/classes/language.php
View
2  catalog/includes/classes/language.php
@@ -83,7 +83,7 @@ function get_browser_language() {
for ($i=0, $n=sizeof($this->browser_languages); $i<$n; $i++) {
reset($this->languages);
- while (list($key, $value) = each($this->languages)) {
+ foreach($this->languages as $key => $value) {
if (preg_match('/^(' . $value . ')(;q=[0-9]\\.[0-9])?$/i', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) {
$this->language = $this->catalog_languages[$key];
break 2;
Please sign in to comment.
Something went wrong with that request. Please try again.