summaryrefslogtreecommitdiff
path: root/ext/dom/php_dom.c
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2017-01-02 11:58:14 +0000
committerJoe Watkins <krakjoe@php.net>2017-01-02 11:58:14 +0000
commit243dff2057cff747c9fca50db62de284a9ec34f0 (patch)
tree606101df8e9ed1046de85e9b18dc92b5b030d9f2 /ext/dom/php_dom.c
parent532486569add9b53105279f95a85579dff143852 (diff)
parent9f4d05acecd6e9b30b21dc23106dcd38c027f6da (diff)
downloadphp-git-243dff2057cff747c9fca50db62de284a9ec34f0.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: news entry for PR #2267 Fixed #67474 (getElementsByTagNameNS and default namespace) Add (failing) testcase for bug #67474
Diffstat (limited to 'ext/dom/php_dom.c')
-rw-r--r--ext/dom/php_dom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index 97095b541d..e38071e970 100644
--- a/ext/dom/php_dom.c
+++ b/ext/dom/php_dom.c
@@ -1345,7 +1345,7 @@ xmlNode *dom_get_elements_by_tag_name_ns_raw(xmlNodePtr nodep, char *ns, char *l
while (nodep != NULL && (*cur <= index || index == -1)) {
if (nodep->type == XML_ELEMENT_NODE) {
if (xmlStrEqual(nodep->name, (xmlChar *)local) || xmlStrEqual((xmlChar *)"*", (xmlChar *)local)) {
- if (ns == NULL || (nodep->ns != NULL && (xmlStrEqual(nodep->ns->href, (xmlChar *)ns) || xmlStrEqual((xmlChar *)"*", (xmlChar *)ns)))) {
+ if (ns == NULL || (!strcmp(ns, "") && nodep->ns == NULL) || (nodep->ns != NULL && (xmlStrEqual(nodep->ns->href, (xmlChar *)ns) || xmlStrEqual((xmlChar *)"*", (xmlChar *)ns)))) {
if (*cur == index) {
ret = nodep;
break;