mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-2176: Illegal offset type in isset or empty in UnitOfWork #2740
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 @doctrinebot on GitHub (Nov 28, 2012).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user godzilla80:
Steps to reproduce the problem?
DBAL\Types\StringTypeconvertToPHPValueof custom DBAL type returns an instance of a class (implements**toStringmethod){color:red}
Warning: Illegal offset type in isset or empty in
vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.phpline 2407{color}
I guess the solution in
Doctrine\ORM\Internal\Hydrationnamespace by explicit converting result ofconvertToPHPValueif result is not a scalar value.@doctrinebot commented on GitHub (Nov 28, 2012):
@doctrinebot commented on GitHub (Jan 23, 2013):
Comment created by @ocramius:
This one will introduce way too much overhead. We don't really support identifiers that are custom object types.
What is the exact version of the ORM? I couldn't spot anything at line 2407.
@doctrinebot commented on GitHub (Jan 24, 2013):
Comment created by godzilla80:
I use a dev branch and updated the version since creation of the report, hence the line number changed to 2466.
Ok, I understand the overhead problem. I only tried to create a custom enum type that is represented by a class.
But i solved this by converting the value within the getter/setter of entity class.
It would have been nice to do this in the DBAL type, but it works that way.
Therefore, you might close the report or move it on a far future version "wishlist". :)
Anyway, thank for your time.
Nevertheless the information you requested:
Composer: doctrine/orm [2.3.x-dev
fdd0af3]git reference: fdd0af34e6fced967b8751bc3e4792c11ef86d57
Additionally, exception trace might help
@doctrinebot commented on GitHub (May 1, 2013):
Comment created by @beberlei:
This works in this recent commit here,
0864ab8ada. Should have worked before as well. Can you verify?@doctrinebot commented on GitHub (May 1, 2013):
Comment created by @beberlei:
Related to DDC-1998, tests this behavior
@doctrinebot commented on GitHub (May 1, 2013):
Issue was closed with resolution "Duplicate"
@doctrinebot commented on GitHub (Aug 28, 2013):
Comment created by relaxnow:
I'm still getting this issue, even after upgrading to 2.4.0-RC2.
@doctrinebot commented on GitHub (Aug 28, 2013):
Comment created by @ocramius:
Just a note: this is broken since 2.4 because before 2.4 we didn't convert meta fields via DBAL types. If your identifier is an object this will probably be the problem. We could cast it to string though.