Skip to content

Commit 4c65a39

Browse files
committed
Improve argument error messages in ext/sodium
1 parent 960318e commit 4c65a39

File tree

4 files changed

+128
-258
lines changed

4 files changed

+128
-258
lines changed

Zend/zend.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,12 +1528,7 @@ ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const c
15281528
va_list va;
15291529
char *message = NULL;
15301530

1531-
if (exception_ce) {
1532-
if (!instanceof_function(exception_ce, zend_ce_error)) {
1533-
zend_error(E_NOTICE, "Error exceptions must be derived from Error");
1534-
exception_ce = zend_ce_error;
1535-
}
1536-
} else {
1531+
if (!exception_ce) {
15371532
exception_ce = zend_ce_error;
15381533
}
15391534

0 commit comments

Comments
 (0)