Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed reset pointer array as not needed for foreach

  • Loading branch information...
commit 7522252cb2dc7755a4a6e8afb7ba0ddb5f31a158 1 parent 3682d13
unknown authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  catalog/includes/classes/language.php
View
3  catalog/includes/classes/language.php
@@ -82,8 +82,7 @@ function get_browser_language() {
$this->browser_languages = explode(',', $_SERVER["HTTP_ACCEPT_LANGUAGE"]);
$n=sizeof($this->browser_languages);
for ($i=0; $i<$n; $i++) {
- reset($this->languages);
- foreach($this->languages as $key => $value) {
+ 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.