summaryrefslogtreecommitdiff
path: root/ext/dom/document.c
diff options
context:
space:
mode:
authorAaron Piotrowski <aaron@trowski.com>2015-07-05 02:37:49 -0500
committerAaron Piotrowski <aaron@trowski.com>2015-07-05 12:16:57 -0500
commit907476f34c0dbe34e311c4a99cc07eb40fd2954b (patch)
tree58c26abe27284c5c221182161cb89fdc90cadc1e /ext/dom/document.c
parent550bbf8f4614a5c868010195f562be3e9ee6bb00 (diff)
downloadphp-git-907476f34c0dbe34e311c4a99cc07eb40fd2954b.tar.gz
Convert E_ERROR to thrown Error in extensions
Diffstat (limited to 'ext/dom/document.c')
-rw-r--r--ext/dom/document.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c
index 0ab0e498c8..4a6c178d71 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -2223,11 +2223,13 @@ PHP_METHOD(domdocument, registerNodeClass)
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
if (dom_set_doc_classmap(intern->document, basece, ce) == FAILURE) {
- php_error_docref(NULL, E_ERROR, "Class %s could not be registered.", ZSTR_VAL(ce->name));
+ zend_throw_error(zend_ce_error, "Class %s could not be registered.", ZSTR_VAL(ce->name));
+ RETURN_FALSE;
}
RETURN_TRUE;
} else {
- php_error_docref(NULL, E_ERROR, "Class %s is not derived from %s.", ZSTR_VAL(ce->name), ZSTR_VAL(basece->name));
+ zend_throw_error(zend_ce_error, "Class %s is not derived from %s.", ZSTR_VAL(ce->name), ZSTR_VAL(basece->name));
+ RETURN_FALSE;
}
RETURN_FALSE;