mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #1538] Check if identityMap contains entity in UnitOfWork::getEntityIdentifier() to prevent "Undefined index" notice #9596
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?
Original Pull Request: https://github.com/doctrine/orm/pull/1538
State: closed
Merged: No
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.