DoctrineModule icon indicating copy to clipboard operation
DoctrineModule copied to clipboard

Empty label doesnt work correctly for ObjectSelect

Open cbichis opened this issue 11 years ago • 1 comments

On Form\Element\Proxy.php

    if ($this->displayEmptyItem) {
        $options[''] = $this->getEmptyItemLabel();
    }

Should be changed to:

$options[] = array('label' => $this->getEmptyItemLabel(), 'value' => '');

Otherwise the emptyLabel wont be displayed properly and rater a NULL is inserted as item...

cbichis avatar Mar 09 '15 13:03 cbichis

Also, this seems to colide with emptyOption from Zend\Form\Element\Select which is adding the NULL actually...

cbichis avatar Mar 09 '15 13:03 cbichis