Browse Source

[ZF-9795] Zend_Locale:

- performance improvement on isLocale()

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22176 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas 15 years ago
parent
commit
38342d7f59
1 changed files with 1 additions and 1 deletions
  1. 1 1
      library/Zend/Locale.php

+ 1 - 1
library/Zend/Locale.php

@@ -807,7 +807,7 @@ class Zend_Locale
      */
     public static function isLocale($locale, $strict = false, $compatible = true)
     {
-        if ($locale instanceof Zend_Locale) {
+        if (($locale instanceof Zend_Locale) || (array_key_exists($locale, self::$_localeData))) {
             return true;
         }