shane           Sun Oct  5 17:49:48 2003 EDT

  Modified files:              
    /php-src/ext/dom    element.c 
  Log:
  fix crash accessing tagName without namespace
  
  
Index: php-src/ext/dom/element.c
diff -u php-src/ext/dom/element.c:1.15 php-src/ext/dom/element.c:1.16
--- php-src/ext/dom/element.c:1.15      Sun Oct  5 16:45:26 2003
+++ php-src/ext/dom/element.c   Sun Oct  5 17:49:47 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: element.c,v 1.15 2003/10/05 20:45:26 shane Exp $ */
+/* $Id: element.c,v 1.16 2003/10/05 21:49:47 shane Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -116,10 +116,12 @@
        if (ns != NULL && ns->prefix) {
                qname = xmlStrdup(ns->prefix);
                qname = xmlStrcat(qname, ":");
+               qname = xmlStrcat(qname, nodep->name);
+               ZVAL_STRING(*retval, qname, 1);
+               xmlFree(qname);
+       } else {
+               ZVAL_STRING(*retval, nodep->name, 1);
        }
-       qname = xmlStrcat(qname, nodep->name);
-       ZVAL_STRING(*retval, qname, 1);
-       xmlFree(qname);
 
        return SUCCESS;
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to