mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Undefined Index In ObjectHydrator #6116
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 @kiler129 on GitHub (Dec 1, 2018).
Bug Report
doctrine/ormv2.6.3Summary
ObjectHydratorcrashes duringiterate().I wasn't able to write a failing test case as discussed with @Ocramius on Slack.How to reproduce
https://github.com/kiler129/doctrine_undef_idx/blob/master/src/Command/TestCommand.php
This is a minimal project which will crash doctrine: https://github.com/kiler129/doctrine_undef_idx
Also failing testcase is available: https://github.com/doctrine/doctrine2/pull/7499
Expected behavior
The objects are hydrated properly.
Note
There's a horrible, hacky, and dangerous way to walk around the issue which should never be used (unless you have few days to a major release):
@kiler129 commented on GitHub (Dec 1, 2018):
It may be related to:
@Ocramius commented on GitHub (Dec 1, 2018):
Can you please represent the same test in the form of a unit test, like in https://github.com/doctrine/doctrine2/tree/master/tests/Doctrine/Tests/ORM/Functional/Ticket
@Ocramius commented on GitHub (Dec 1, 2018):
Sorry, closed by accident due to mobile UI.
@kiler129 commented on GitHub (Dec 1, 2018):
I fiddled with this and I think I created the simplest scenario possible in a form of a functional testcase: https://github.com/doctrine/doctrine2/pull/7499
@peter-gribanov commented on GitHub (Feb 1, 2019):
I encountered the same problem.
My code:
Error:
In ObjectHydrator#L525 the
$resultvariable equals empty array.@peter-gribanov commented on GitHub (Mar 20, 2019):
Are there any updates for this?
@SenseException commented on GitHub (Mar 21, 2019):
There's an open change request in #7499 that needs to be done.
@beberlei commented on GitHub (Feb 8, 2021):
Bug is fixed with new
AbstractQuery::toIterableand a fix in upcoming 2.8.2