Re: [PATCH] make "Call to a member function on a non-object" non-fatal

From: Date: Fri, 23 May 2003 21:57:29 +0000
Subject: Re: [PATCH] make "Call to a member function on a non-object" non-fatal
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-1952@lists.php.net to get a copy of this message
On Fri, 23 May 2003, Morten Poulsen wrote: > The patch might not be the right way to implement it. Calling a member > function on null happens from time to time, when programmers don't check > the return value of a library call. In a production environment it is > bad, not having the option to handle the error, therefore it is bad to > just die. Throwing an exception might be a nicer way, but isn't that > future? Calling a member function on a null should not even happen in production environment, if you architecture your application properly. -Andrei "The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka!" but "That's funny..." -- Isaac Asimov.

« previous php.internals (#1952) next »