Details
Description
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.
Eg:
$form->birthYear->addMultiOption('', '');
or
$form->birthYear->addMultiOption(null, null);
Will output something like
<option value="" label="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 " selected="selected">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 </option>
I believe this behaviour, which has been corrected for fieldset labels (ZF-2913), should also be corrected for field labels.
Thank you.
Assigning to Thomas.