[DDC-2086] [GH-484] Prevented "Undefined index" notice when updating Created: 17/Oct/12 Updated: 31/Dec/13 Resolved: 25/Oct/12
|Project:||Doctrine 2 - ORM|
|Affects Version/s:||2.3, Git Master|
|Reporter:||Benjamin Eberlei||Assignee:||Benjamin Eberlei|
OS X 10.8.2, PHP 5.3.17, Nginx 1.2.4 (php through FPM)
This issue is created automatically through a Github pull request on behalf of jappie:
While executing updates on an entity scheduled for update without a change-set, an "Undefined index" notice is raised.
This issue will occur when you manually call $em()->getUnitOfWork()->scheduleForUpdate() on an entity that hasn't changed. The entity will be included in UnitOfWork::$entityUpdates, but because there are no changes, its oid will not be included in UnitOfWork::$entityChangeSets.
I know I'm misusing scheduleForUpdate() a bit in this case, but the notice can easily be prevented with a !empty().
|Comment by Benjamin Eberlei [ 22/Oct/12 ]|
A related Github Pull-Request [GH-484] was closed
|Comment by Fabio B. Silva [ 25/Oct/12 ]|
|Comment by Doctrine Bot [ 31/Dec/13 ]|
A related Github Pull-Request [GH-484] was closed: