com php-src: Fix dom class can't be inherited by the internal class: ext/dom/php_dom.c
| From: | Nikita Popov | Date: | Sun, 01 Jan 2017 11:20:04 +0000 |
| Subject: | com php-src: Fix dom class can't be inherited by the internal class: ext/dom/php_dom.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-96482@lists.php.net to get a copy of this message | ||
Commit: 3c977618e1f0a3821deeb56fc55e00fb22ed2402
Author: dreamszhu <dreamsxin@qq.com> Sun, 1 Jan 2017 17:10:28 +0800
Committer: Nikita Popov <nikic@php.net> Sun, 1 Jan 2017 12:20:04 +0100
Parents: 97e16ebbe2976dad22e8238958d3d5f023cc0132
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3c977618e1f0a3821deeb56fc55e00fb22ed2402
Log:
Fix dom class can't be inherited by the internal class
Changed paths:
M ext/dom/php_dom.c
Diff:
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index b6dc791..9984356 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;
}