diff options
Diffstat (limited to 'ext/dom/document.c')
| -rw-r--r-- | ext/dom/document.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c index f541d7b80a..1bd244c9ae 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1501,14 +1501,14 @@ PHP_METHOD(domdocument, __construct) dom_object *intern; char *encoding, *version = NULL; int encoding_len = 0, version_len = 0, refcount; + zend_error_handling error_handling; - php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|ss", &id, dom_document_class_entry, &version, &version_len, &encoding, &encoding_len) == FAILURE) { - php_std_error_handling(); return; } - php_std_error_handling(); + zend_restore_error_handling(&error_handling TSRMLS_CC); docp = xmlNewDoc(version); if (!docp) { |
