summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-05-08 15:04:43 +0000
committerMarcus Boerger <helly@php.net>2003-05-08 15:04:43 +0000
commitd3693d9214102163677ddfa9ddc9ec9eb2b8c64d (patch)
tree3bd3496ec49162acadb84c548d183dde2c744714
parent97f3a35d73015647aa492696b57f31d15ad52568 (diff)
downloadphp-git-d3693d9214102163677ddfa9ddc9ec9eb2b8c64d.tar.gz
Inheritance fix
# here we go again, sorry for the mess and thanks to edin for reverting it
-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;
}