summaryrefslogtreecommitdiff
path: root/ext/dom
diff options
context:
space:
mode:
authorShane Caraveo <shane@php.net>2003-10-05 21:53:08 +0000
committerShane Caraveo <shane@php.net>2003-10-05 21:53:08 +0000
commite12aafca6b2582eb7630d15a57445a7c0ba3fad8 (patch)
tree0b0b085cb1af8593db9ac0878ff77a7615617971 /ext/dom
parent4fbf5a0733026faa62cdf34ee5523313ad88eb19 (diff)
downloadphp-git-e12aafca6b2582eb7630d15a57445a7c0ba3fad8.tar.gz
fix crash building nodeName
Diffstat (limited to 'ext/dom')
-rw-r--r--ext/dom/node.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/dom/node.c b/ext/dom/node.c
index 6a6c0fe74d..d8a487247d 100644
--- a/ext/dom/node.c
+++ b/ext/dom/node.c
@@ -78,9 +78,11 @@ int dom_node_node_name_read(dom_object *obj, zval **retval TSRMLS_DC)
if (ns != NULL && ns->prefix) {
qname = xmlStrdup(ns->prefix);
qname = xmlStrcat(qname, ":");
+ qname = xmlStrcat(qname, nodep->name);
+ str = qname;
+ } else {
+ str = (char *) nodep->name;
}
- qname = xmlStrcat(qname, nodep->name);
- str = qname;
break;
case XML_DOCUMENT_TYPE_NODE:
case XML_DTD_NODE: