]> granicus.if.org Git - php/commitdiff
Inheritance fix
authorMarcus Boerger <helly@php.net>
Thu, 8 May 2003 15:04:43 +0000 (15:04 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 8 May 2003 15:04:43 +0000 (15:04 +0000)
# here we  go again, sorry for the mess and thanks to edin for reverting it

Zend/zend_compile.c

index 7660b9751f428380da4813d3ce291584da22d836..5bdffcbacd2d4fdacbd2f2bd46a47020ecde221d 100644 (file)
@@ -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;
 }