From: Marcus Boerger Date: Thu, 8 May 2003 15:04:43 +0000 (+0000) Subject: Inheritance fix X-Git-Tag: RELEASE_0_9b~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3693d9214102163677ddfa9ddc9ec9eb2b8c64d;p=php Inheritance fix # here we go again, sorry for the mess and thanks to edin for reverting it --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 7660b9751f..5bdffcbacd 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1613,7 +1613,20 @@ static void do_inherit_parent_constructor(zend_class_entry *ce) { zend_function *function; - if (!ce->parent || ce->constructor) { + if (!ce->parent) { + return; + } + if (!ce->__get) { + ce->__get = ce->parent->__get; + } + if (!ce->__set) { + ce->__set = ce->parent->__set; + } + if (!ce->__call) { + ce->__call = ce->parent->__call; + } + ce->create_object = ce->parent->create_object; + if (ce->constructor) { return; } @@ -1632,16 +1645,6 @@ static void do_inherit_parent_constructor(zend_class_entry *ce) } } ce->constructor = ce->parent->constructor; - if (!ce->__get) { - ce->__get = ce->parent->__get; - } - if (!ce->__set) { - ce->__set = ce->parent->__set; - } - if (!ce->__call) { - ce->__call = ce->parent->__call; - } - ce->create_object = ce->parent->create_object; }