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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to