ZF-4133: addTranslate() overwrites locale
Description
The method addTranslation() in Zend_Translate_Adapter contains a bug at the end of the method which overwrites the previous locale. It checks whether the original locale is set with:
isset($translate[$originate])
However this is never true since the variable $translate does not exist. It should rather be
isset($this->_translate[$originate])
Otherwise when performing a directory scan the locale will be set to the last one found during the scan.
Comments
Posted by Thomas Weidner (thomas) on 2008-08-30T10:00:19.000+0000
When performing a directory scan the locale will never be set to the last one if you provide a locale yourself. The testbed would show such a behaviour.
The second clause will be checked anyway. There will only be a notice because of this problem, but no change in the behaviour of this class.
Posted by Wil Sinclair (wil) on 2008-09-02T10:39:25.000+0000
Updating for the 1.6.0 release.