ZF-2864: getLocale() returns string instead of expected Zend_Locale
Description
As API Doc says getLocale() should return a Zend_Locale instance. Instead it returns a string like 'de_DE'.
$locale = $translate->getLocale();
Zend_Debug::dump(is_object($locale)); #returns false;
Zend_Debug::dump(is_string($locale)); #returns true;
$lang = $locale->toString(); #Fatal error: Call to a member function toString() on a non-object
Comments
Posted by Thomas Weidner (thomas) on 2008-03-11T13:34:23.000+0000
But "de_DE" is the locale.
A Zend_Locale can be * a object of type Zend_Locale * a locale definition string from Zend_Locale
Both are true and valid... Every class which takes a locale must accepts both ways.
Posted by Thomas Weidner (thomas) on 2008-03-11T13:46:05.000+0000
Changed the APIdoc to be consistent with the implementation.
Posted by Wil Sinclair (wil) on 2008-03-21T17:15:45.000+0000
I can't tell which version this was fixed for. Thomas, could you please add a rev number in the form rXXXX where X's are digits when you resolve the issue? Thanks.
Posted by Thomas Weidner (thomas) on 2008-03-21T17:59:06.000+0000
Fixed with r8672