ZF-3749: Zend_Translate with the gettext adapter returns an unexpected result when called with an empty string
When Zend_Translate (used with the gettext adapter) is fed an empty string, it returns a long string of header file information (see ZF-2914). This is the normal behaviour.
However, when Zend_Form uses Zend_Translate in a similar context, the output is not appropriate.
For example, if I have a list for which I want the first entry to be empty (so there is no default selection made), the label of that first entry (an empty string) is being translated by the gettext adapter to the string of system info. This is obviously not what I want.
$form->birthYear->addMultiOption('', ''); or $form->birthYear->addMultiOption(null, null);
Will output something like
Project-Id-Version: removed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-07-23 22:23-0500 PO-Revision-Date: Last-Translator: removed Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: English X-Poedit-Country: CANADA X-Poedit-SourceCharset: utf-8 X-Poedit-KeywordsList: translate X-Poedit-Basepath: removed X-Poedit-SearchPath-0: removed
I believe this behaviour, which has been corrected for fieldset labels (ZF-2913), should also be corrected for field labels.