mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3632: [GH-1345] Fix crashes in ConvertMappingCommand and GenerateEntitiesCommand... #4461
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Mar 20, 2015).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of zeroedin-bill:
Url: https://github.com/doctrine/doctrine2/pull/1345
Message:
... when using entities with joined table inheritance
ConvertMappingCommand and GenerateEntitiesCommand both use the DisconnectedClassMetadataFactory, which allows metadata manipulation without loading the associated classes. Commit a36bea broke these two commands by adding a bailout condition in ClassMetadataFactory::populateDiscriminatorValue which checks $metadata->reflClass->isAbstract(). If the DisconnectedClassMetadataFactory is being used, $metadata->reflClass will always be null, causing a fatal error, "Fatal error: Call to a member function isAbstract() on null".
This commit adds a check to see if $metadata->reflClass is set before checking isAbstract.