mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3875: Warning: spl_object_hash() expects parameter 1 to be object, null given #4743
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 (Aug 21, 2015).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user syagr:
!http://joxi.ru/vAWypEBsPYZjmW.jpg!
I use Symfony 2.7 And when I used sonata admin with code below got this error.
->add('menuToItem', 'sonata_type_collection',
My code:
array('label' => 'Items', 'by_reference' => false),
array(
'edit' => 'inline',
'inline' => 'table',
'sortable' => 'position',
)
)
;
When I replaced code bellow in file UnitOfWork.php all became okay.
from
public function cancelOrphanRemoval($entity)
{
unset($this->orphanRemovals[spl_object_hash($entity)]);
}
to
public function cancelOrphanRemoval($entity)
{
if($entity)
unset($this->orphanRemovals[spl_object_hash($entity)]);
}
Can you add this fix?