Przeglądaj źródła

[ZF-10114] Zend_Locale:

- fixed notice when requesting a browser locale when there is no browser

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22535 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas 15 lat temu
rodzic
commit
1754a5e974
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      library/Zend/Locale.php

+ 2 - 2
library/Zend/Locale.php

@@ -426,12 +426,12 @@ class Zend_Locale
         }
 
         $httplanguages = getenv('HTTP_ACCEPT_LANGUAGE');
-        if (empty($httplanguages)) {
+        if (empty($httplanguages) && array_key_exists('HTTP_ACCEPT_LANGUAGE', $_SERVER)) {
             $httplanguages = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
         }
 
         $languages     = array();
-        if (empty($httplanguages) === true) {
+        if (empty($httplanguages)) {
             return $languages;
         }