summaryrefslogtreecommitdiff
path: root/ext/dom/domimplementation.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-08-10 20:39:58 (GMT)
committerMarcus Boerger <helly@php.net>2003-08-10 20:39:58 (GMT)
commitd2ea062ef03aa9745f300ffdbbe7507019c18fc4 (patch)
treee34f5f596979299ab3a63ed7c00468359324685e /ext/dom/domimplementation.c
parent9274d2c203b4d6a316127b0cf88f7b7e59376b69 (diff)
downloadphp-d2ea062ef03aa9745f300ffdbbe7507019c18fc4.tar.gz
Fix warnings
Diffstat (limited to 'ext/dom/domimplementation.c')
-rw-r--r--ext/dom/domimplementation.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c
index dd255a2..6eb1186 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);
}