From: dreamszhu Date: Sun, 1 Jan 2017 09:10:28 +0000 (+0800) Subject: Fix dom class can't be inherited by the internal class X-Git-Tag: php-7.1.1RC1~37^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c977618e1f0a3821deeb56fc55e00fb22ed2402;p=php Fix dom class can't be inherited by the internal class --- diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index b6dc791d3d..9984356c30 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -1075,7 +1075,7 @@ static dom_object* dom_objects_set_class(zend_class_entry *class_type, zend_bool dom_object *intern = ecalloc(1, sizeof(dom_object) + zend_object_properties_size(class_type)); zend_class_entry *base_class = class_type; - while (base_class->type != ZEND_INTERNAL_CLASS && base_class->parent != NULL) { + while ((base_class->type != ZEND_INTERNAL_CLASS || base_class->info.internal.module->module_number != dom_module_entry.module_number) && base_class->parent != NULL) { base_class = base_class->parent; }