Re: obj == null check generates E_NOTICE
| From: | Andi Gutmans | Date: | Mon, 15 Mar 2004 16:31:12 +0000 |
| Subject: | Re: obj == null check generates E_NOTICE | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-8530@lists.php.net to get a copy of this message | ||
At 11:21 AM 3/15/2004 -0500, Hans Lellelid wrote:
obj == null checks now trigger E_NOTICE class Foo { } $t = new Foo(); if ($t == null) { } Notice - Object of class Foo could not be converted to boolean Changing the comparison to $t === null makes the notice go away. Is this intended? If not I can post it as a bug report.I already fixed this. We added a bit too aggressive notice :) Now it's not quite as aggressive as I would like it to be but it behaves like in PHP 4. Andi