Skip to content

Commit 02c0761

Browse files
committed
Use match any for ns too (note: contains bugfix for which I'll create PR)
1 parent 0ff0ee3 commit 02c0761

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/dom/php_dom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ xmlNode *dom_get_elements_by_tag_name_ns_raw(xmlNodePtr nodep, char *ns, char *l
12401240
while (nodep != NULL && (*cur <= index || index == -1)) {
12411241
if (nodep->type == XML_ELEMENT_NODE) {
12421242
if (local_match_any || xmlStrEqual(nodep->name, (xmlChar *)local)) {
1243-
if (ns_match_any || (!strcmp(ns, "") && nodep->ns == NULL) || (nodep->ns != NULL && xmlStrEqual(nodep->ns->href, (xmlChar *)ns))) {
1243+
if (ns_match_any || (ns[0] == '\0' && nodep->ns == NULL) || (nodep->ns != NULL && xmlStrEqual(nodep->ns->href, (xmlChar *)ns))) {
12441244
if (*cur == index) {
12451245
ret = nodep;
12461246
break;

0 commit comments

Comments
 (0)