Using latest SVN (8721).

Not a major issue but when using translation and a multi element with arrays as the options (optgroup), warnings are raised. Don't know if this is a multi issue or a translation issue so I didn't file anything...

*Controller:*
$translate = new Zend_Translate('array', array('Select Test'=>'Select Test Translated'), 'en');
Zend_Registry::set('Zend_Translate', $translate);
$form = new Zend_Form(array(
   'elements' => array(
       'test' => array('Select', array(
           'label' => 'Select Test',
           'MultiOptions' => array(
               'Group 1' => array(
                   '1-1' => 'Hi 1-1',
                   '1-2' => 'Hi 1-2'
               ),
               'Group 2' => array(
                   '2-1' => 'Hi 2-1',
                   '2-2' => 'Hi 2-2'
               ),
           )
       ))
   )
));
$this->view->form = $form;

With...

*View:*
<?=$this->form?>

Produces...

*Warning*: array_key_exists() [function.array-key-exists <http://es.testcomm1.viame.com/vtest/function.array-key-exists>]: The first argument should be either a string or an integer in */directory/library/Zend/Translate/Adapter.php* on line *452*

Reply via email to