doctrine / DoctrineModule

Doctrine Module for Laminas
http://www.doctrine-project.org/projects/doctrine-module.html
MIT License
398 stars 270 forks source link

Add default value for $property in Proxy.php #811

Closed japaveh closed 1 year ago

japaveh commented 1 year ago

When using the new 6.0 branch together with an EntitySelect which uses a proxy I am getting the following error

File:
/var/www/vendor/doctrine/doctrine-module/src/Form/Element/Proxy.php: 461
Message:
Typed property DoctrineModule\Form\Element\Proxy::$property must not be accessed before initialization

This is because the $property property has no default value. In this pull request I use the default value null and also changed the check on 461 to a $this->property !== null to have a correct boolean result