diff options
Diffstat (limited to 'ext/dom/document.c')
-rw-r--r-- | ext/dom/document.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c index 30d9c13ee9..70289cf54a 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1856,7 +1856,7 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type vptr = xmlSchemaNewValidCtxt(sptr); if (!vptr) { xmlSchemaFree(sptr); - php_error(E_ERROR, "Invalid Schema Validation Context"); + zend_throw_error(NULL, "Invalid Schema Validation Context"); RETURN_FALSE; } @@ -1956,7 +1956,7 @@ static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int typ vptr = xmlRelaxNGNewValidCtxt(sptr); if (!vptr) { xmlRelaxNGFree(sptr); - php_error(E_ERROR, "Invalid RelaxNG Validation Context"); + zend_throw_error(NULL, "Invalid RelaxNG Validation Context"); RETURN_FALSE; } @@ -2244,15 +2244,11 @@ PHP_METHOD(domdocument, registerNodeClass) if (ce == NULL || instanceof_function(ce, basece)) { 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)); - } + dom_set_doc_classmap(intern->document, basece, ce); 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(NULL, "Class %s is not derived from %s.", ZSTR_VAL(ce->name), ZSTR_VAL(basece->name)); RETURN_FALSE; } /* }}} */ |