cvs: php-src /ext/dom document.c domimplementation.c
| From: | Marcus Boerger | Date: | Sun, 10 Aug 2003 20:39:58 +0000 |
| Subject: | cvs: php-src /ext/dom document.c domimplementation.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-23070@lists.php.net to get a copy of this message | ||
helly Sun Aug 10 16:39:58 2003 EDT
Modified files:
/php-src/ext/dom document.c domimplementation.c
Log:
Fix warnings
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.17 php-src/ext/dom/document.c:1.18
--- php-src/ext/dom/document.c:1.17 Sun Jul 27 13:57:06 2003
+++ php-src/ext/dom/document.c Sun Aug 10 16:39:58 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: document.c,v 1.17 2003/07/27 17:57:06 rrichards Exp $ */
+/* $Id: document.c,v 1.18 2003/08/10 20:39:58 helly Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -790,7 +790,7 @@
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;
Index: php-src/ext/dom/domimplementation.c
diff -u php-src/ext/dom/domimplementation.c:1.6 php-src/ext/dom/domimplementation.c:1.7
--- php-src/ext/dom/domimplementation.c:1.6 Sun Jul 27 13:57:06 2003
+++ php-src/ext/dom/domimplementation.c Sun Aug 10 16:39:58 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domimplementation.c,v 1.6 2003/07/27 17:57:06 rrichards Exp $ */
+/* $Id: domimplementation.c,v 1.7 2003/08/10 20:39:58 helly Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -152,6 +152,8 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, "DocumentType: Wrong Document");
RETURN_FALSE;
}
+ } else {
+ doctobj = NULL;
}
if (name_len > 0) {
@@ -216,7 +218,7 @@
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);
}