mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1173: Fatal error when a listener resets an object in onFlush and recompute the changeset #1474
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 (May 26, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user stof:
When a listener resets an entity during onFlush and recompute the changeset (setting it to null as there is no changes), the following triggering of preUpdate fails as PreUpdateEventArgs would get null as third argument which is forbidden
@doctrinebot commented on GitHub (May 30, 2011):
Comment created by gediminasm:
Here is a test case:
use Doctrine\Common\EventSubscriber;
use Doctrine\ORM\Event\PreUpdateEventArgs;
use Doctrine\ORM\Event\OnFlushEventArgs;
class DummyListener implements EventSubscriber
{
public function getSubscribedEvents()
{
return array('preUpdate', 'onFlush');
}
}
triggers fatal error
@doctrinebot commented on GitHub (Jun 5, 2011):
Comment created by @beberlei:
Only fixed in 2.1
@doctrinebot commented on GitHub (Jun 5, 2011):
Issue was closed with resolution "Fixed"