Merge branch 'PHP-8.2'

This commit is contained in:
Derick Rethans 2023-01-10 15:16:42 +00:00
commit cc4e958932
3 changed files with 18 additions and 3 deletions

View file

@ -1,4 +1,4 @@
/* Generated by re2c 0.15.3 on Thu Dec 1 10:59:46 2022 */
/* Generated by re2c 0.15.3 on Tue Jan 10 15:16:26 2023 */
#line 1 "ext/date/lib/parse_date.re"
/*
* The MIT License (MIT)
@ -787,7 +787,7 @@ static timelib_long timelib_lookup_abbr(const char **ptr, int *dst, char **tz_ab
(**ptr >= 'A' && **ptr <= 'Z') ||
(**ptr >= 'a' && **ptr <= 'z') ||
(**ptr >= '0' && **ptr <= '9') ||
**ptr == '/' || **ptr == '_' || **ptr == '-'
**ptr == '/' || **ptr == '_' || **ptr == '-' || **ptr == '+'
) {
++*ptr;
}

View file

@ -785,7 +785,7 @@ static timelib_long timelib_lookup_abbr(const char **ptr, int *dst, char **tz_ab
(**ptr >= 'A' && **ptr <= 'Z') ||
(**ptr >= 'a' && **ptr <= 'z') ||
(**ptr >= '0' && **ptr <= '9') ||
**ptr == '/' || **ptr == '_' || **ptr == '-'
**ptr == '/' || **ptr == '_' || **ptr == '-' || **ptr == '+'
) {
++*ptr;
}

View file

@ -0,0 +1,15 @@
--TEST--
Bug GH-10218 (DateTimeZone fails to parse time zones that contain the "+" character)
--FILE--
<?php
var_dump(new DateTime('now', new DateTimeZone('Etc/GMT+1')));
?>
--EXPECTF--
object(DateTime)#%d (%d) {
["date"]=>
string(%d) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
string(9) "Etc/GMT+1"
}