Hi,
I imagine its because NULL doesn't have a 'type' persay? (=== means equal
and same type?)
What happens if you replace
if ($something === null) {
with
if ($something ==null) {
?
On Monday, 19 May 2014 05:25:47 UTC+10, Parsifal wrote:
>
>
> when I do this:
> $something = $blah->getX();
>
> $something may have no value, because may be there is not any X associated
> to $blah, I want to checv it with if statement to see if there is an entity
> for $something, update it, if no entity, create it. I tried both:
> if ($something === null) {
> and
> if ($something === false) {
> but it goes always to else clause if there is no entity found. I tried
> debug:dump and I get blank entity, this is why it is not null but when I
> want to update it, I get "entity not found" error, what should I check to
> solve this? or what wrong I did?
> I tried it with several other entities, with different associations and
> method names, and there is always such problem. plz help.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.