From d3693d9214102163677ddfa9ddc9ec9eb2b8c64d Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Thu, 8 May 2003 15:04:43 +0000 Subject: [PATCH] Inheritance fix # here we go again, sorry for the mess and thanks to edin for reverting it --- Zend/zend_compile.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) 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; } -- 2.40.0