]> granicus.if.org Git - php/commitdiff
fix for Bug #24715 segfault in dom_document_create_element
authorRob Richards <rrichards@php.net>
Sat, 19 Jul 2003 14:59:29 +0000 (14:59 +0000)
committerRob Richards <rrichards@php.net>
Sat, 19 Jul 2003 14:59:29 +0000 (14:59 +0000)
removed xmlmemorydump debug code

ext/dom/document.c
ext/dom/php_dom.c

index 491681f838da4dcb2140fd3848dd08f24928257a..2fdab8c7999a8e9485a3f15eff128940a904184c 100644 (file)
@@ -451,16 +451,16 @@ PHP_FUNCTION(dom_document_create_element)
        xmlNode *node;
        xmlDocPtr docp;
        dom_object *intern;
-       int ret, name_len;
-       char *name;
+       int ret, name_len, value_len;
+       char *name, *value = NULL;
 
        DOM_GET_THIS_OBJ(docp, id, xmlDocPtr, intern);
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &name, &name_len) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &name, &name_len, &value, &value_len) == FAILURE) {
                return;
        }
 
-       node = xmlNewDocNode(docp, NULL, name, NULL);
+       node = xmlNewDocNode(docp, NULL, name, value);
        if (!node) {
                RETURN_FALSE;
        }
index c23d30436bf48d94b85f8c65b95fdd52208b03ae..c6ff95fa573d35c1f9f8b34bcac9d5f294e525fe 100644 (file)
@@ -659,7 +659,7 @@ PHP_MSHUTDOWN_FUNCTION(dom)
        uncomment the following line, this will tell you the amount of not freed memory
        and the total used memory into apaches error_log  */
 /*  xmlMemoryDump();*/
-xmlMemoryDump();
+
        return SUCCESS;
 }