mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1592: uasort - user function modyfied array #1997
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 (Jan 10, 2012).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user gremplus:
$model - Doctrine ORM model with many2one relation to type model
$iterator = $model->getIterator();
This code return exception:
'ErrorException' with message 'uasort() [function.uasort]: Array was modified by the user comparison function'
After investigation, it was found out that problem is when lazy loading has occured.
If collection is already initialized there is no problem.
Version 2.0 has not this issue.
@doctrinebot commented on GitHub (Jan 10, 2012):
Comment created by adambro:
It seems to be known bug that is caused by changing number of references (i.e. throwing exception):
https://bugs.php.net/bug.php?id=50688
@doctrinebot commented on GitHub (Jan 15, 2012):
Comment created by @beberlei:
This is a PHP bug, please voice up in the issue mentioned above.
For now you can do the following in your code:
@doctrinebot commented on GitHub (Jan 15, 2012):
Issue was closed with resolution "Can't Fix"