mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Use NULL where possible for exception class
Matches usage of zend_throw_exception()/zend_throw_exception_ex().
This commit is contained in:
parent
29c3cd4448
commit
5df893ce3c
14 changed files with 892 additions and 892 deletions
|
@ -261,7 +261,7 @@ ZEND_METHOD(exception, __construct)
|
|||
} else {
|
||||
ce = base_ce;
|
||||
}
|
||||
zend_throw_error(zend_ce_error, "Wrong parameters for %s([string $message [, long $code [, Throwable $previous = NULL]]])", ZSTR_VAL(ce->name));
|
||||
zend_throw_error(NULL, "Wrong parameters for %s([string $message [, long $code [, Throwable $previous = NULL]]])", ZSTR_VAL(ce->name));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -297,7 +297,7 @@ ZEND_METHOD(error_exception, __construct)
|
|||
} else {
|
||||
ce = zend_ce_error_exception;
|
||||
}
|
||||
zend_throw_error(zend_ce_error, "Wrong parameters for %s([string $message [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Throwable $previous = NULL]]]]]])", ZSTR_VAL(ce->name));
|
||||
zend_throw_error(NULL, "Wrong parameters for %s([string $message [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Throwable $previous = NULL]]]]]])", ZSTR_VAL(ce->name));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1033,7 +1033,7 @@ ZEND_API void zend_throw_exception_object(zval *exception) /* {{{ */
|
|||
exception_ce = Z_OBJCE_P(exception);
|
||||
|
||||
if (!exception_ce || !instanceof_function(exception_ce, zend_ce_throwable)) {
|
||||
zend_throw_error(zend_ce_error, "Cannot throw objects that do not implement Throwable");
|
||||
zend_throw_error(NULL, "Cannot throw objects that do not implement Throwable");
|
||||
return;
|
||||
}
|
||||
zend_throw_exception_internal(exception);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue