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

From: Date: Sun, 25 May 2003 14:18:43 +0000
Subject: Re: [PATCH] make "Call to a member function on a non-object" non-fatal
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-2022@lists.php.net to get a copy of this message
On Friday, May 23, 2003, at 06:08 PM, Morten Poulsen wrote:
On Fri, 2003-05-23 at 23:57, Andrei Zmievski wrote:
Calling a member function on a null should not even happen in production environment, if you architecture your application properly.
Correct. "Should not," but they do.
Code shouldn't have parse errors either, but it sometimes does. Should we protect against that as well? Andrei's point is that with simple error checking you can handle this case. Your developers being too sloppy/lazy to take these basic steps doesn't mean that php should do it for them. Their is an ongoing thread regarding converting a number of E_ERROR errors to exceptions for php5. This case clearly fits well into that idea. George

« previous php.internals (#2022) next »