diff options
author | Uwe Steinmann <steinm@php.net> | 2000-02-03 21:11:58 +0000 |
---|---|---|
committer | Uwe Steinmann <steinm@php.net> | 2000-02-03 21:11:58 +0000 |
commit | fb46032cbb7ee9b18445ec682562484301179998 (patch) | |
tree | 9a929ca25ec483323ee952a191bd442d3c795a2e | |
parent | e0628436f3ae6c0dbb2422ceced596e9fc1fe47a (diff) | |
download | php-git-fb46032cbb7ee9b18445ec682562484301179998.tar.gz |
- fixed several bugs, left some for tomorrow :-)
-rw-r--r-- | ext/domxml/domxml.c | 15 |
1 files changed, 10 insertions, 5 deletions
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) { |