#45105 [NEW]: Type Hinting cause Fatal error instead on NullPointorException

From: Date: Tue, 27 May 2008 08:56:25 +0000
Subject: #45105 [NEW]: Type Hinting cause Fatal error instead on NullPointorException
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-125294@lists.php.net to get a copy of this message
From: kingoleg at mail dot ru Operating system: Irrelevant PHP version: 5.2.6 PHP Bug Type: Feature/Change Request Bug description: Type Hinting cause Fatal error instead on NullPointorException Description: ------------ In same cases type hinting cause Fatal Error. I think that in one case NullPoinor will be better. Reproduce code: --------------- function foo(stdClass $a) { } foo(null); Expected result: ---------------- Exception is thrown Actual result: -------------- Fatal error -- Edit bug report at http://bugs.php.net/?id=45105&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45105&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45105&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45105&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45105&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45105&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45105&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45105&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45105&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45105&r=support Expected behavior: http://bugs.php.net/fix.php?id=45105&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45105&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45105&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45105&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45105&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45105&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45105&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45105&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45105&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45105&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45105&r=mysqlcfg

« previous php.bugs (#125294) next »