Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spl_object_hash() expects parameter 1 to be object, null given in UnitOfWork line 2725 #6267

Open
michsk opened this issue Jan 31, 2017 · 6 comments

Comments

@michsk
Copy link

michsk commented Jan 31, 2017

So i started to play with the SecondLevelCache. And somehow just got this warning:
Warning: spl_object_hash() expects parameter 1 to be object, null given in vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line

That line is $newValueOid = spl_object_hash($newValue);. Somehow we cant find the newValue.

@michsk
Copy link
Author

michsk commented Jan 31, 2017

Seems to have to do with @ORM\ManyToOne(targetEntity="\Namespace\Domain\Entity\Option\Layout", inversedBy="elements", fetch="EAGER")

which can be null

@lcobucci lcobucci self-assigned this Jan 31, 2017
@lcobucci
Copy link
Member

@Michal-sk are you using 2.5.x or master?

@lcobucci
Copy link
Member

@Michal-sk I'm asking because we fixed a lot of issues related to L2C and they will just be available on v2.6 (that we don't have a release date yet).

Would be very helpful if you could test your application with 2.6.x-dev and check if that problem still happens.

@michsk
Copy link
Author

michsk commented Jan 31, 2017

"doctrine/orm": "^2", with the "minimum-stability": "stable",

I see where this goes wrong though, when there is a relation to a entity that does not exist. So i have a Element that has a reverence to a Layout that does nto exist.

@michsk
Copy link
Author

michsk commented Jan 31, 2017

will check with 2.6

@Ocramius
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants