summaryrefslogtreecommitdiff
path: root/ext/xsl
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-09-25 10:18:12 +0200
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-09-25 12:08:15 +0200
commit41b096b392e551df51c80d29f6f30c163a0630ea (patch)
treeea1eda0afdce34542d9305ae9d8ff39363d1af5f /ext/xsl
parent166178ae6db297e8168cbef0afc281fd1a49e93c (diff)
downloadphp-git-41b096b392e551df51c80d29f6f30c163a0630ea.tar.gz
Promote a few forgotten warnings to exceptions
Closes GH-6211
Diffstat (limited to 'ext/xsl')
-rw-r--r--ext/xsl/xsltprocessor.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c
index deac062bfa..d900d95103 100644
--- a/ext/xsl/xsltprocessor.c
+++ b/ext/xsl/xsltprocessor.c
@@ -573,9 +573,10 @@ PHP_METHOD(XSLTProcessor, transformToDoc)
ce = zend_lookup_class(ret_class);
if (ce == NULL || !instanceof_function(ce, curce)) {
xmlFreeDoc(newdocp);
- php_error_docref(NULL, E_WARNING,
- "Expecting class compatible with %s, '%s' given", ZSTR_VAL(curclass_name), ZSTR_VAL(ret_class));
- RETURN_FALSE;
+ zend_argument_type_error(2, "must be a class name compatible with %s, \"%s\" given",
+ ZSTR_VAL(curclass_name), ZSTR_VAL(ret_class)
+ );
+ RETURN_THROWS();
}
object_init_ex(return_value, ce);