Permalink
Browse files

Removed reset pointer array as not needed for foreach

  • Loading branch information...
unknown unknown
unknown authored and unknown committed Aug 14, 2011
1 parent 3682d13 commit 7522252cb2dc7755a4a6e8afb7ba0ddb5f31a158
Showing with 1 addition and 2 deletions.
  1. +1 −2 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;

0 comments on commit 7522252

Please sign in to comment.