Browse Source

[GENERIC] Zend_Locale:

- fixed rerouting for splitted locale

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19295 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas 16 years ago
parent
commit
ee7c067aa8
2 changed files with 2 additions and 2 deletions
  1. 1 1
      library/Zend/Locale.php
  2. 1 1
      tests/Zend/LocaleTest.php

+ 1 - 1
library/Zend/Locale.php

@@ -752,7 +752,7 @@ class Zend_Locale
             return true;
             return true;
         }
         }
 
 
-        if (($locale !== null) and !is_string($locale) and !is_array($locale)) {
+        if (($locale === null) || (!is_string($locale) and !is_array($locale))) {
             return false;
             return false;
         }
         }
 
 

+ 1 - 1
tests/Zend/LocaleTest.php

@@ -795,7 +795,7 @@ class Zend_LocaleTest extends PHPUnit_Framework_TestCase
         $locale = $value->toString();
         $locale = $value->toString();
         $this->assertTrue(!empty($locale));
         $this->assertTrue(!empty($locale));
 
 
-        $this->assertTrue(Zend_LocaleTestHelper::isLocale(null));
+        $this->assertFalse(Zend_LocaleTestHelper::isLocale(null));
 
 
         $value = new Zend_LocaleTestHelper(0);
         $value = new Zend_LocaleTestHelper(0);
         $value = $value->toString();
         $value = $value->toString();