ClassHints and NULL

From: Date: Tue, 15 Jun 2004 11:27:26 +0000
Subject: ClassHints and NULL
Groups: php.internals 
Request: Send a blank email to internals+get-10464@lists.php.net to get a copy of this message
Hi, I wonder if it is intended behavior, that execution stops when PHP stumbles across something like the following: ===#=== function doSth(Foo $Foo) { if (!isset($Foo)) return; // ... } doSth(null); ===#=== PHP Fatal Error: Argument 1 must not be null at ... on line 2 Is there *ANY* serious reason why NULL is not allowed in place of an object? PHP will become *really* odd if this is the way it goes. People won't stick to this new feature... Also, these errors are hard to track because they refer to the line number where the function definition is, not where the actual violation was comitted. Regards, -- Michael - < mike(@)php.net >

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.internals (#10464) next »