You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Could not catch deprecation notice from IntlDateFormatter() #8115
Handle str_contains(): Passing null to parameter #2 ($needle) of type string is deprecated
PHP Deprecated: IntlDateFormatter::__construct(): Passing null to parameter #3 ($timeType) of type int is deprecated in dep.php on line 5
Deprecated: IntlDateFormatter::__construct(): Passing null to parameter #3 ($timeType) of type int is deprecated in dep.php on line 5
But I expected this output instead:
Handle str_contains(): Passing null to parameter #2 ($needle) of type string is deprecated
Handle IntlDateFormatter::__construct(): Passing null to parameter #3 ($timeType) of type int is deprecated in dep.php on line 5
/* return_value param is being changed, therefore we will always return
* NULL here */
return_value = ZEND_THIS;
if (datefmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU) == FAILURE) {
Arguments are parsed in datefmt_ctor but zend_replace_error_handling replaces the error handler before that. Usually zend_replace_error_handling is only called after arguments are already parsed.
Activity
iluuu1994 commentedon Feb 18, 2022
The problem occurs here:
php-src/ext/intl/dateformat/dateformat_create.cpp
Lines 204 to 208 in 90e4d54
Arguments are parsed in
datefmt_ctorbutzend_replace_error_handlingreplaces the error handler before that. Usuallyzend_replace_error_handlingis only called after arguments are already parsed.Allowing catching arg type deprecations in intl classes