summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_compile.c25
1 files 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;
}