diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 5e486d7a2f6..7bbc9914d41 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1547,6 +1547,9 @@ static void do_inherit_parent_constructor(zend_class_entry *ce) } if (!ce->__call) { ce->__call = ce->parent->__call; + } + if (!ce->destructor) { + ce->destructor = ce->parent->destructor; } ce->create_object = ce->parent->create_object; if (ce->constructor) {