Explorar o código

[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 %!s(int64=16) %!d(string=hai) anos
pai
achega
ee7c067aa8
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  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;
         }
 
-        if (($locale !== null) and !is_string($locale) and !is_array($locale)) {
+        if (($locale === null) || (!is_string($locale) and !is_array($locale))) {
             return false;
         }
 

+ 1 - 1
tests/Zend/LocaleTest.php

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