From: Uwe Steinmann Date: Thu, 3 Feb 2000 21:11:58 +0000 (+0000) Subject: - fixed several bugs, left some for tomorrow :-) X-Git-Tag: BEFORE_SAPIFICATION_FEB_10_2000~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb46032cbb7ee9b18445ec682562484301179998;p=php - fixed several bugs, left some for tomorrow :-) --- diff --git a/ext/domxml/domxml.c b/ext/domxml/domxml.c index 8fc2d06ab8..c71089120c 100644 --- a/ext/domxml/domxml.c +++ b/ext/domxml/domxml.c @@ -633,7 +633,8 @@ PHP_FUNCTION(domxml_dumpmem) pval *id, **tmp; int id_to_find; xmlDoc *docp; - xmlChar *mem; + char *mem; +// xmlChar *mem; int size; int type; @@ -665,7 +666,7 @@ PHP_FUNCTION(domxml_dumpmem) if (!size) { RETURN_FALSE; } - RETURN_STRINGL(mem, size, 0); + RETURN_STRINGL(mem, size, 1); } /* }}} */ @@ -714,6 +715,8 @@ PHP_FUNCTION(domxml_newchild) RETURN_FALSE; } id_to_find = (*tmp)->value.lval; + if(getParameters(ht, 2, &name, &content) == FAILURE) + WRONG_PARAM_COUNT; } else { RETURN_FALSE; } @@ -722,9 +725,9 @@ PHP_FUNCTION(domxml_newchild) } else { convert_to_long(id); id_to_find = id->value.lval; - convert_to_string(name); - convert_to_string(content); } + convert_to_string(name); + convert_to_string(content); nodep = (xmlNode *)zend_list_find(id_to_find, &type); if (!nodep || type != le_domxmlnodep) { @@ -768,6 +771,8 @@ PHP_FUNCTION(domxml_addroot) RETURN_FALSE; } id_to_find = (*tmp)->value.lval; + if (getParameters(ht, 1, &name) == FAILURE) + WRONG_PARAM_COUNT; } else { RETURN_FALSE; } @@ -776,8 +781,8 @@ PHP_FUNCTION(domxml_addroot) } else { convert_to_long(id); id_to_find = id->value.lval; - convert_to_string(name); } + convert_to_string(name); docp = (xmlDoc *)zend_list_find(id_to_find, &type); if (!docp || type != le_domxmldocp) {