summaryrefslogtreecommitdiff
path: root/ext/simplexml/simplexml.c
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2016-08-30 10:54:31 +0200
committerNikita Popov <nikic@php.net>2016-08-30 10:54:31 +0200
commit07cc6a6ba2d8cebe2b375353491a26953b250149 (patch)
treed78a50442169fdec1fc998a5e836127505e26317 /ext/simplexml/simplexml.c
parentb5f2f6fbd802ad3bc4fb37185e9e776bb089db56 (diff)
downloadphp-git-07cc6a6ba2d8cebe2b375353491a26953b250149.tar.gz
Fix bug #72971
Diffstat (limited to 'ext/simplexml/simplexml.c')
-rw-r--r--ext/simplexml/simplexml.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 3b27656786..7c1e68787c 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -807,7 +807,7 @@ static int sxe_prop_dim_exists(zval *object, zval *member, int check_empty, zend
while (node) {
xmlNodePtr nnext;
nnext = node->next;
- if ((node->type == XML_ELEMENT_NODE) && !xmlStrcmp(node->name, (xmlChar *)Z_STRVAL_P(member))) {
+ if (node->type == XML_ELEMENT_NODE && !xmlStrcmp(node->name, (xmlChar *)Z_STRVAL_P(member)) && match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefix)) {
break;
}
node = nnext;
@@ -937,7 +937,7 @@ static void sxe_prop_dim_delete(zval *object, zval *member, zend_bool elements,
SKIP_TEXT(node);
- if (!xmlStrcmp(node->name, (xmlChar *)Z_STRVAL_P(member))) {
+ if (!xmlStrcmp(node->name, (xmlChar *)Z_STRVAL_P(member)) && match_ns(sxe, node, sxe->iter.nsprefix, sxe->iter.isprefix)) {
xmlUnlinkNode(node);
php_libxml_node_free_resource(node);
}