diff options
Diffstat (limited to 'ext/domxml/php_domxml.c')
| -rw-r--r-- | ext/domxml/php_domxml.c | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index e3b6a6ea81..41f99e9cfd 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -3714,6 +3714,11 @@ PHP_FUNCTION(domxml_dump_node)  		RETURN_FALSE;  	} +	if (docp->type != XML_DOCUMENT_NODE && docp->type != XML_HTML_DOCUMENT_NODE) { +		php_error_docref(NULL TSRMLS_CC, E_WARNING, "Object has to be a DomDocument Node"); +		RETURN_FALSE; +	} +  	buf = xmlBufferCreate();  	if (!buf) {  		php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not fetch buffer"); | 
