com php-src: Fix dom class can't be inherited by the internal class: ext/dom/php_dom.c
| From: | Joe Watkins | Date: | Sun, 01 Jan 2017 06:48:02 +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-96471@lists.php.net to get a copy of this message | ||
Commit: 705f60e481b891d009ec9bb4c88390545ff95880
Author: dreamszhu <dreamsxin@qq.com> Sun, 1 Jan 2017 09:45:09 +0800
Committer: Joe Watkins <krakjoe@php.net> Sun, 1 Jan 2017 06:48:02 +0000
Parents: 242d924e599d2c92a5d12873ad1564f7d44f7126
Branches: PHP-7.1
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=705f60e481b891d009ec9bb4c88390545ff95880
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 9879d81..a59e63a 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 !=
&dom_module_entry) && base_class->parent != NULL) {
base_class = base_class->parent;
}