From: Christian Stocker Date: Tue, 8 Apr 2003 17:22:19 +0000 (+0000) Subject: make it possible to free DomHtmlDocuments as well X-Git-Tag: RELEASE_0_5~90 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b99146a5c732c586a24e51afa846e9be82a17ee9;p=php make it possible to free DomHtmlDocuments as well --- diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index 72098ddf73..529c1345d7 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -4416,8 +4416,8 @@ PHP_FUNCTION(domxml_doc_free_doc) DOMXML_GET_THIS_OBJ(docp, doc, le_domxmldocp); - if (docp->type != XML_DOCUMENT_NODE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "DOM Document is required"); + if (! (docp->type == XML_DOCUMENT_NODE || docp->type == XML_HTML_DOCUMENT_NODE) ) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "DomDocument is required"); RETURN_FALSE; }