doctrine / doctrine/DoctrineModule

Empty label doesnt work correctly for ObjectSelect

Open
#483 1 comment 0 reactions 0 assignees View on GitHub
Bug
Dominant language
PHP
Stars
392
Forks
263
PR merge metrics
No merged PRs in 30d

Description

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...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.