From d2ea062ef03aa9745f300ffdbbe7507019c18fc4 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sun, 10 Aug 2003 20:39:58 +0000 Subject: [PATCH] Fix warnings --- ext/dom/document.c | 2 +- ext/dom/domimplementation.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/dom/document.c b/ext/dom/document.c index 6489510615..aaa5d58d90 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -790,7 +790,7 @@ PHP_FUNCTION(dom_document_create_element_ns) zval *id, *rv = NULL; xmlDocPtr docp; xmlNodePtr nodep = NULL; - xmlNsPtr nsptr; + xmlNsPtr nsptr = NULL; int ret, uri_len = 0, name_len = 0; char *uri, *name; char *localname = NULL, *prefix = NULL; diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c index dd255a21ce..6eb11863cb 100644 --- a/ext/dom/domimplementation.c +++ b/ext/dom/domimplementation.c @@ -152,6 +152,8 @@ PHP_FUNCTION(dom_domimplementation_create_document) php_error_docref(NULL TSRMLS_CC, E_WARNING, "DocumentType: Wrong Document"); RETURN_FALSE; } + } else { + doctobj = NULL; } if (name_len > 0) { @@ -216,7 +218,7 @@ PHP_FUNCTION(dom_domimplementation_create_document) DOM_RET_OBJ(rv, (xmlNodePtr) docp, &ret, NULL); - if (doctype != NULL) { + if (doctobj != NULL) { doctobj->document = ((dom_object *)((node_ptr *)docp->_private)->_private)->document; increment_document_reference(doctobj, docp TSRMLS_CC); } -- 2.40.0