mirror of
https://github.com/php/php-src.git
synced 2026-03-26 09:12:14 +01:00
Fix warnings
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user