ID: 38741 Updated by: [EMAIL PROTECTED] Reported By: fh at ez dot no -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: linux PHP Version: 5.1.6 New Comment:
Undefined variables result in notices, as well as undefined attributes. Undefined functions result in fatal errors, as well as undefined methods. No bug here. Previous Comments: ------------------------------------------------------------------------ [2006-09-07 12:06:57] fh at ez dot no Description: ------------ Accessing a null object will only result in a notice if you are accessing a property but a fatal error if you are trying to access a method. This is especially strange if the object you expected to access uses __get and so you actually expect your code to fail. I think at the very least that the notice should be upgraded to a warning. An error is also in place since accessing a member variable of a null value is most probably a serious problem in your application. Reproduce code: --------------- <?php $var = null; echo $var->member; // notice $var->member(); // fatal error ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38741&edit=1
