Skip to content

Commit 118b04b

Browse files
committed
Improve argument error messages in ext/sodium
Closes GH-5197
1 parent 531ea6d commit 118b04b

File tree

6 files changed

+132
-261
lines changed

6 files changed

+132
-261
lines changed

Zend/zend.c

+1-6
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)