DDC-3971: [GH-1538] Check if identityMap contains entity in UnitOfWork::getEntityIdentifier() to prevent "Undefined index" notice #4848

Closed
opened 2026-01-22 14:50:27 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (Oct 31, 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 elnoro:

Url: https://github.com/doctrine/doctrine2/pull/1538

Message:

Some people use UnitOfWork directly and could run into this issue. Seems nicer to throw an exception with an explanation, so they could find an error in their code faster without necessity to look through library code for the source of notice.
Also, if notices are disabled in php.ini (in production enviroment, for example), this method will return null and probably lead to undefined behavior.

Originally created by @doctrinebot on GitHub (Oct 31, 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 elnoro: Url: https://github.com/doctrine/doctrine2/pull/1538 Message: Some people use UnitOfWork directly and could run into this issue. Seems nicer to throw an exception with an explanation, so they could find an error in their code faster without necessity to look through library code for the source of notice. Also, if notices are disabled in php.ini (in production enviroment, for example), this method will return null and probably lead to undefined behavior.
admin added the Bug label 2026-01-22 14:50:27 +01:00
admin closed this issue 2026-01-22 14:50:27 +01:00
Author
Owner

@doctrinebot commented on GitHub (Nov 6, 2015):

Comment created by @doctrinebot:

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

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

@doctrinebot commented on GitHub (Nov 6, 2015):

Comment created by @doctrinebot:

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

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

@doctrinebot commented on GitHub (Nov 6, 2015):

Comment created by @ocramius:

Won't be fixed due to performance concerns

@doctrinebot commented on GitHub (Nov 6, 2015): Comment created by @ocramius: Won't be fixed due to performance concerns
Author
Owner

@doctrinebot commented on GitHub (Nov 6, 2015):

Issue was closed with resolution "Won't Fix"

@doctrinebot commented on GitHub (Nov 6, 2015): Issue was closed with resolution "Won't Fix"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4848