#26789 [NEW]: NullPointerException desired
| From: | davidc at blesys dot com | Date: | Sun, 04 Jan 2004 23:23:05 +0000 |
| Subject: | #26789 [NEW]: NullPointerException desired | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-52785@lists.php.net to get a copy of this message | ||
From: davidc at blesys dot com
Operating system: (doesn't apply)
PHP version: 5.0.0b3 (beta3)
PHP Bug Type: Feature/Change Request
Bug description: NullPointerException desired
Description:
------------
I desire a NullPointerException to be thrown, like in Java.
Currently, a fatal error triggers, stopping my entire application.
Many times an object may be null, but the application can continue. In
addition, if an exception were thrown, I could trace it to see why the
exception occured.
Reproduce code:
---------------
$j=null;
$j->someMethod();
Expected result:
----------------
Fatal error: Call to a member function someMethod() on a non-object in
file.php on line 2
--
Edit bug report at http://bugs.php.net/?id=26789&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26789&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26789&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26789&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26789&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26789&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26789&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26789&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26789&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26789&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26789&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26789&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26789&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26789&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26789&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26789&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26789&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26789&r=float