summaryrefslogtreecommitdiff
path: root/ext/dom/documentfragment.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dom/documentfragment.c')
-rw-r--r--ext/dom/documentfragment.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c
index 3b565c4efd..d47fd725e6 100644
--- a/ext/dom/documentfragment.c
+++ b/ext/dom/documentfragment.c
@@ -48,14 +48,19 @@ PHP_METHOD(domdocumentfragment, __construct)
xmlNodePtr nodep = NULL, oldnode = NULL;
dom_object *intern;
+ php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC);
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_documentfragment_class_entry) == FAILURE) {
+ php_std_error_handling();
return;
}
+ php_std_error_handling();
nodep = xmlNewDocFragment(NULL);
- if (!nodep)
+ if (!nodep) {
+ php_dom_throw_error(INVALID_STATE_ERR, 1 TSRMLS_CC);
RETURN_FALSE;
+ }
intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC);
if (intern != NULL) {