obj == null check generates E_NOTICE
| From: | Hans Lellelid | Date: | Mon, 15 Mar 2004 16:21:35 +0000 |
| Subject: | obj == null check generates E_NOTICE | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-8528@lists.php.net to get a copy of this message | ||
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.
Thanks,
Hans