summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Richards <rrichards@php.net>2003-07-19 14:59:29 +0000
committerRob Richards <rrichards@php.net>2003-07-19 14:59:29 +0000
commitd85845a64b0dc05a1417091d7b4cf8bacb8aeaca (patch)
tree7822972084b932e107e66d60ae1744545d22b509
parent892c1fbbe744680a22285973d7feeeaebc680cfa (diff)
downloadphp-git-d85845a64b0dc05a1417091d7b4cf8bacb8aeaca.tar.gz
fix for Bug #24715 segfault in dom_document_create_element
removed xmlmemorydump debug code
-rw-r--r--ext/dom/document.c8
-rw-r--r--ext/dom/php_dom.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c
index 491681f838..2fdab8c799 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -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;
}
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index c23d30436b..c6ff95fa57 100644
--- a/ext/dom/php_dom.c
+++ b/ext/dom/php_dom.c
@@ -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;
}