mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Mention ReturnTypeWillChange attribute in the error message (#7183)
This commit is contained in:
parent
edc87a5c26
commit
773e9ba5d6
4 changed files with 6 additions and 5 deletions
|
@ -875,7 +875,8 @@ static void ZEND_COLD emit_incompatible_method_error(
|
|||
|
||||
if (!return_type_will_change_attribute) {
|
||||
zend_error_at(E_DEPRECATED, NULL, func_lineno(child),
|
||||
"Declaration of %s should be compatible with %s",
|
||||
"Return type of %s should either be compatible with %s, "
|
||||
"or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice",
|
||||
ZSTR_VAL(child_prototype), ZSTR_VAL(parent_prototype));
|
||||
if (EG(exception)) {
|
||||
zend_exception_uncaught_error(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue