diff options
author | Rob Richards <rrichards@php.net> | 2003-10-20 15:43:02 +0000 |
---|---|---|
committer | Rob Richards <rrichards@php.net> | 2003-10-20 15:43:02 +0000 |
commit | 36478058f4b13e16b5d3183b9d02dca794e2c568 (patch) | |
tree | 877d2379ae5d14dbe8d6b56f52fff26ef8d03d3a | |
parent | fe871be5ca9fe9add2c38988f7fbc73c7b0294d1 (diff) | |
download | php-git-36478058f4b13e16b5d3183b9d02dca794e2c568.tar.gz |
Fix bug #25900 (document->get_elements_by_tag_name with default xmlns)
-rw-r--r-- | ext/domxml/php_domxml.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index a76240b2e7..cfb45cc52f 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -3078,11 +3078,11 @@ PHP_FUNCTION(domxml_doc_get_elements_by_tagname) DOMXML_GET_OBJ(contextnodep, contextnode, le_domxmlnodep); } ctxp->node = contextnodep; - str = (char*) emalloc((name_len+3) * sizeof(char)) ; + str = (char*) emalloc((name_len+23) * sizeof(char)) ; if (str == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot allocate memory for string"); } - sprintf(str ,"//%s",name); + sprintf(str ,"//*[local-name() = '%s']", name); xpathobjp = xmlXPathEval(str, ctxp); efree(str); |