Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.10.6
-
Component/s: Zend_Locale
-
Labels:None
Description
Hi,
i have problem with commit #22278. After this commit is generated WARNING:
Warning</b>: array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The first argument should be either a string or an integer in <b>/home/lestr/projekty/alarm-online/trunk/library/Zend/Locale.php</b> on line <b>811</b>
I think there is missing negation before calling is_array function.
This is svn diff from my local copy of releace branche
--- library/Zend/Locale.php (revision 329)
+++ library/Zend/Locale.php (working copy)
@@ -808,7 +808,7 @@
public static function isLocale($locale, $strict = false, $compatible = true)
{
if (($locale instanceof Zend_Locale)
- || (is_array($locale) && array_key_exists($locale, self::$_localeData))
+ || (!is_array($locale) && array_key_exists($locale, self::$_localeData))
) {
return true;
}
Is this fix correct?
I don't know if it's the correct fix but I can confirm that there is a bug.
I think that should be: