summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Richards <rrichards@php.net>2004-07-18 13:16:15 +0000
committerRob Richards <rrichards@php.net>2004-07-18 13:16:15 +0000
commit8925d6573eacc06636d4d86c52454aa280880bfc (patch)
treefc76d571400ae23e97470dc691dac44b8c10b79d
parentd19914a2aac696e427f9272571722c8c9b55dd49 (diff)
downloadphp-git-8925d6573eacc06636d4d86c52454aa280880bfc.tar.gz
MFB: add missing optional value param to createElementNS (chregu)
-rw-r--r--ext/dom/document.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c
index 0be049fea6..a0d6d291dc 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -1063,7 +1063,7 @@ PHP_FUNCTION(dom_document_import_node)
/* }}} end dom_document_import_node */
-/* {{{ proto DOMElement dom_document_create_element_ns(string namespaceURI, string qualifiedName);
+/* {{{ proto DOMElement dom_document_create_element_ns(string namespaceURI, string qualifiedName [,string value]);
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-DocCrElNS
Since: DOM Level 2
*/
@@ -1073,13 +1073,13 @@ PHP_FUNCTION(dom_document_create_element_ns)
xmlDocPtr docp;
xmlNodePtr nodep = NULL;
xmlNsPtr nsptr = NULL;
- int ret, uri_len = 0, name_len = 0;
- char *uri, *name;
+ int ret, uri_len = 0, name_len = 0, value_len = 0;
+ char *uri, *name, *value = NULL;
char *localname = NULL, *prefix = NULL;
int errorcode;
dom_object *intern;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s|s", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len, &value, &value_len) == FAILURE) {
return;
}
@@ -1089,7 +1089,7 @@ PHP_FUNCTION(dom_document_create_element_ns)
if (errorcode == 0) {
if (xmlValidateName((xmlChar *) localname, 0) == 0) {
- nodep = xmlNewDocNode (docp, NULL, localname, NULL);
+ nodep = xmlNewDocNode (docp, NULL, localname, value);
if (nodep != NULL && uri != NULL) {
nsptr = xmlSearchNsByHref (nodep->doc, nodep, uri);
if (nsptr == NULL) {