Re: [PATCH] [ZE] More useful error message for class redeclaration
| From: | Wez Furlong | Date: | Mon, 23 Sep 2002 17:26:14 +0000 |
| Subject: | Re: [PATCH] [ZE] More useful error message for class redeclaration | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-88541@lists.php.net to get a copy of this message | ||
The problem is (as I understand it!) that the ZEND_DECLARE_CLASS case in do_bind_function_or_class
retrieves the class entry for the user-defined
class and not the internal class, and that is why the message reflects
the user class.
I can't really see why this is the case, but then I haven't really delved
into how it all works :-/
--Wez.
On 09/23/02, "Andi Gutmans" <andi@zend.com> wrote:
> Can't you make sure that the filename of internal classes will be NULL and
> then we can check for it and say it's an internal class?
>
> Andi
>
> At 03:59 PM 9/23/2002 +0100, Wez Furlong wrote:
> >Caveat Emptor: if someone tries to redeclare an internal/builtin class
> >such as Directory, the previous declaration will appear to be the
> >actual declaration in the script. I'm not sure of the best way to
> >resolve this.