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
This seems intentional. This behavior was only introduced in PHP 8.2. Backporting it to PHP 8.1 would be a BC break. I'm not sure whether the new behavior was a good idea to begin with... /cc @derickr
This was a bug fix in PHP 8.2 — the code for date_get_last_errors has been meaning to return false if no warnings or errors were found for the last 16 years:
15 years ago Derick Rethans 9f979a16bfa│2967│ PHP_FUNCTION(date_get_last_errors)
16 years ago Derick Rethans 4043f77e36b│2968│ {
3 years ago Máté Kocsis 2204dbde3bc│2969│ ZEND_PARSE_PARAMETERS_NONE();
│2970│
15 years ago Derick Rethans 9f979a16bfa│2971│ if (DATEG(last_errors)) {
15 years ago Ilia Alshanets bbf53bbb041│2972│ array_init(return_value);
15 years ago Derick Rethans 9f979a16bfa│2973│ zval_from_error_container(return_value, DATEG(last_errors));
│2974│ } else {
16 years ago Derick Rethans 4043f77e36b│2975│ RETURN_FALSE;
│2976│ }
15 years ago Derick Rethans 9f979a16bfa│2977│ }
Description
This is the original report for PHP 8.2.1.
This is the fix for 8.2.1.
The following code:
Resulted in this output:
But I expected this output instead:
As shown at this test URL https://3v4l.org/eU2ra#v8.1.15 version 8.2.2 returns the correct result but 8.1.15 does not.
PHP Version
PHP 8.1.15
Operating System
Windows 10
The text was updated successfully, but these errors were encountered: