Promote a few forgotten warnings to exceptions

Closes GH-6211
This commit is contained in:
Máté Kocsis 2020-09-25 10:18:12 +02:00
parent 166178ae6d
commit 41b096b392
No known key found for this signature in database
GPG key ID: FD055E41728BF310
18 changed files with 92 additions and 72 deletions

View file

@ -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);