ID: 26789 Updated by: [EMAIL PROTECTED] Reported By: davidc at blesys dot com -Status: Open +Status: Wont fix Bug Type: Feature/Change Request Operating System: (doesn't apply) PHP Version: 5.0.0b3 (beta3) New Comment:
If you want to have "NULL" objects, test if an object is NULL before you call methods on it. There is no chance this will be implemented. Previous Comments: ------------------------------------------------------------------------ [2004-01-04 18:23:05] davidc at blesys dot com 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 this bug report at http://bugs.php.net/?id=26789&edit=1
