mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #6017] Avoid error when entityName isn't a string #9825
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/6017
State: closed
Merged: No
Previously I wasn't used the
->clear()method in the correct way. I always put the full entity object in parameter instead of the entity name. It worked before the 2.5.5 even if in fact it cleared nothing ...With 2.5.5 a check has been added in
clearIdentityMapForEntityNameto verify if the given entity name exist in the entityMap.Using
issetwith the entity object generated a PHP errorIllegal offset type in isset or empty.This PR aim to remove that error.
I'm not sure if this is the right way to fix that problem. I'm maybe the only person who gave the entity object as parameter to the
clearfunction.Maybe we should better detect if it's an object in the
clearfunction and use the:classattribute to get the class name?Like