DDC-3632: [GH-1345] Fix crashes in ConvertMappingCommand and GenerateEntitiesCommand... #4462

Closed
opened 2026-01-22 14:42:08 +01:00 by admin · 5 comments
Owner

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.

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.
admin added the Bug label 2026-01-22 14:42:08 +01:00
admin closed this issue 2026-01-22 14:42:08 +01:00
Author
Owner

@doctrinebot commented on GitHub (Mar 22, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1345] was assigned:
https://github.com/doctrine/doctrine2/pull/1345

@doctrinebot commented on GitHub (Mar 22, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1345] was assigned: https://github.com/doctrine/doctrine2/pull/1345
Author
Owner

@doctrinebot commented on GitHub (Mar 22, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1345] was labeled:
https://github.com/doctrine/doctrine2/pull/1345

@doctrinebot commented on GitHub (Mar 22, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1345] was labeled: https://github.com/doctrine/doctrine2/pull/1345
Author
Owner

@doctrinebot commented on GitHub (Mar 22, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1345] was labeled:
https://github.com/doctrine/doctrine2/pull/1345

@doctrinebot commented on GitHub (Mar 22, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1345] was labeled: https://github.com/doctrine/doctrine2/pull/1345
Author
Owner

@doctrinebot commented on GitHub (Mar 23, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1345] was merged:
https://github.com/doctrine/doctrine2/pull/1345

@doctrinebot commented on GitHub (Mar 23, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1345] was merged: https://github.com/doctrine/doctrine2/pull/1345
Author
Owner

@doctrinebot commented on GitHub (Mar 23, 2015):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Mar 23, 2015): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4462