summaryrefslogtreecommitdiff
path: root/ext/dom/document.c
diff options
context:
space:
mode:
authorSean Finney <seanius@debian.org>2009-06-24 22:49:04 +0200
committerSean Finney <seanius@debian.org>2009-06-24 22:49:04 +0200
commit84f4ca9b07fe5b73d840258f4aa7c1eb534c4253 (patch)
tree9829bd578af8a4a8b42b04277f9067e00dc5ad90 /ext/dom/document.c
parent6821b67124604da690c5e9276d5370d679c63ac8 (diff)
downloadphp-upstream/5.3.0_RC4.tar.gz
Imported Upstream version 5.3.0~RC4upstream/5.3.0_RC4upstream/5.3.0.RC4
Diffstat (limited to 'ext/dom/document.c')
-rw-r--r--ext/dom/document.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c
index 5cd0a7e82..ea3d1a825 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: document.c,v 1.68.2.3.2.5.2.15 2009/03/13 13:43:29 rrichards Exp $ */
+/* $Id: document.c,v 1.68.2.3.2.5.2.17 2009/06/14 13:13:35 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1196,6 +1196,9 @@ PHP_FUNCTION(dom_document_import_node)
if (nodep->doc == docp) {
retnodep = nodep;
} else {
+ if ((recursive == 0) && (nodep->type == XML_ELEMENT_NODE)) {
+ recursive = 2;
+ }
retnodep = xmlDocCopyNode(nodep, docp, recursive);
if (!retnodep) {
RETURN_FALSE;
@@ -1933,11 +1936,7 @@ PHP_FUNCTION(dom_document_validate)
}
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
-
- if (docp->intSubset == NULL) {
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "No DTD given in XML-Document");
- }
-
+
cvp = xmlNewValidCtxt();
cvp->userData = NULL;