Re: Re: cvs: ZendEngine2(PHP_5_2) / zend_compile.c zend_object_handlers.c /tests bug37632.phpt

From: Date: Tue, 30 May 2006 21:46:24 +0000
Subject: Re: Re: cvs: ZendEngine2(PHP_5_2) / zend_compile.c zend_object_handlers.c /tests bug37632.phpt
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-23794@lists.php.net to get a copy of this message
Marcus Boerger wrote:
-/* $Id: zend_compile.c,v 1.647.2.27.2.5 2006/05/27 18:23:48 johannes Exp $ */ +/* $Id: zend_compile.c,v 1.647.2.27.2.6 2006/05/29 20:06:43 helly Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -2028,8 +2028,9 @@
        if (parent_flags & ZEND_ACC_ABSTRACT) {
                child->common.fn_flags |= ZEND_ACC_IMPLEMENTED_ABSTRACT;
                child->common.prototype = parent;
-       } else {
-               child->common.prototype = parent->common.prototype;
+       } else if (!(parent->common.fn_flags & ZEND_ACC_CTOR) ||
(parent->common.prototype && parent->common.prototype->common.scope->ce_flags && ZEND_ACC_INTERFACE)) {
This looks buggy to me, shouldn't it be parent->common.prototype->common.scope->ce_flags & ZEND_ACC_INTERFACE instead of parent->common.prototype->common.scope->ce_flags && ZEND_ACC_INTERFACE here anyway? Might not be related to the bug reported by Sebastian but reading the patch excerpt from Antony I stumbled over this one... If the patch is reverted anyway then it doesn't matter, just wanted to mention it in case the code can still be used. Regards, - Chris

« previous php.internals (#23794) next »