mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Warning: Illegal offset type in isset or empty in UnitOfWork #5362
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 @astalker on GitHub (Dec 23, 2016).
Originally assigned to: @Ocramius on GitHub.
I'm experiencing the following error
Warning: Illegal offset type in isset or emptyfrom UnitOfWork.php. I believe this was introduced in v2.5.5 and is still apparent in v2.5.6Thrown from the following line 3469 in v2.5.5 (3486 in v2.5.6).
This is caused when passing an entityName to the clear method such as
$em->clear($entity);Please let me know if further details are required.
@Ocramius commented on GitHub (Dec 23, 2016):
$entitymust be a string.This is a duplicate of https://github.com/doctrine/doctrine2/pull/6017
@astalker commented on GitHub (Dec 23, 2016):
Cool, I had a look through but wasn't sure if it was exactly the same issue or not.
@astalker commented on GitHub (Dec 23, 2016):
@Ocramius I've looked at the changes in #6017 and it still causes an issue for us as it enforces the existing behaviour with another error. Essentially the behaviour change in 2.5.5 is still present.
I understand we are passing in the wrong thing essentially but its not an insignificant task for us to go through and make all the changes as a result of a bug fix release. For now I've updated our dependencies to use 2.5.4. We will of course make the correct changes going forward.
Its not a big deal in this case as we caught it in time but I think it important to highlight with a bit of feedback. A minor behaviour change to enforce correct behaviour can have much larger knock on effects when included as a bug fix release rather than a minor or major release with BC implications highlighted.
The work is appreciated of course - cheers and Merry Christmas!
@Ocramius commented on GitHub (Dec 23, 2016):
There is no behaviour change: it is documented as accepting an optional
string parameter, and an object was given. This is not something that needs
any action on doctrine's side.
On 23 Dec 2016 16:15, "Alasdair Stalker" notifications@github.com wrote: