diff options
| author | Stanislav Malyshev <stas@php.net> | 2003-01-12 18:57:18 +0000 |
|---|---|---|
| committer | Stanislav Malyshev <stas@php.net> | 2003-01-12 18:57:18 +0000 |
| commit | 33b67ab868ac9637139dbf92b17840aacf8183c1 (patch) | |
| tree | 7115bc078c49c2dff84424b2497a99c0f3f3a10e /Zend/zend_compile.c | |
| parent | 98175957a78b3150ae652c9219969a248a578483 (diff) | |
| download | php-git-33b67ab868ac9637139dbf92b17840aacf8183c1.tar.gz | |
fix inheritance
Diffstat (limited to 'Zend/zend_compile.c')
| -rw-r--r-- | Zend/zend_compile.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index fcc7c41a8d..a02c3182e5 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1537,9 +1537,15 @@ static void do_inherit_parent_constructor(zend_class_entry *ce) function_add_ref(function); } ce->constructor = ce->parent->constructor; - ce->__get = ce->parent->__get; - ce->__set = ce->parent->__set; - ce->__call = ce->parent->__call; + if (!ce->__get) { + ce->__get = ce->parent->__get; + } + if (!ce->__set) { + ce->__set = ce->parent->__set; + } + if (!ce->__call) { + ce->__call = ce->parent->__call; + } } @@ -1621,15 +1627,6 @@ void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce) zend_hash_merge(&ce->constants_table, &parent_ce->constants_table, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0); zend_hash_merge_ex(&ce->function_table, &parent_ce->function_table, (copy_ctor_func_t) do_inherit_method, sizeof(zend_function), (zend_bool (*)(void *, void *)) do_inherit_method_check); ce->parent = parent_ce; - if (!ce->__get) { - ce->__get = parent_ce->__get; - } - if (!ce->__set) { - ce->__set = parent_ce->__set; - } - if (!ce->__call) { - ce->__call = parent_ce->__call; - } do_inherit_parent_constructor(ce); } |
