mirror of
https://github.com/doctrine/orm.git
synced 2026-04-24 06:58:19 +02:00
DDC-232: toArray of PersistentCollection returns an empty collection #286
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 3, 2010).
Jira issue originally created by user cloun:
I've found little error in the class Doctrine\ORM\PersistentCollection in method toArray. There is lost calling of _initialize method probably. This leads to abnormal behavior:
class Role
{
...
/****
*/
private $resources;
public function makeTest()
{
echo count($this->resources->toArray()) . "\n";
echo count($this->resources) . "\n";
}
...
}
Output:
0
1
@doctrinebot commented on GitHub (Jan 3, 2010):
@doctrinebot commented on GitHub (Jan 5, 2010):
Comment created by romanb:
Should be fixed now.
@doctrinebot commented on GitHub (Jan 5, 2010):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Jan 5, 2010):
Comment created by cloun:
Thanks