[php-src] PHP-8.4: Re-generate outdated parse_date.c file

From: Date: Sun, 04 Oct 2026 16:32:08 +0000
Subject: [php-src] PHP-8.4: Re-generate outdated parse_date.c file
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-141926@lists.php.net to get a copy of this message
Author: Ilija Tovilo (iluuu1994) Date: 2026-10-04T18:30:37+02:00 Commit: https://github.com/php/php-src/commit/aaa870786c23fd278f60702ca00a4579359f6934 Raw diff: https://github.com/php/php-src/commit/aaa870786c23fd278f60702ca00a4579359f6934.diff Re-generate outdated parse_date.c file Changed paths: M ext/date/lib/parse_date.c M ext/date/tests/bug35499.phpt Diff: diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c index 1f92d7929f62..d1578c0e0f1c 100644 --- a/ext/date/lib/parse_date.c +++ b/ext/date/lib/parse_date.c @@ -1,4 +1,4 @@ -/* Generated by re2c 1.0.3 on Wed Jan 14 14:20:50 2026 */ +/* Generated by re2c 1.0.3 on Sun Oct 4 18:25:15 2026 */ #line 1 "ext/date/lib/parse_date.re" /* * The MIT License (MIT) @@ -557,7 +557,6 @@ static timelib_ull timelib_get_signed_nr(Scanner *s, const char **ptr, int max_l int len = 0; /* Skip over non-numeric chars */ - while (((**ptr < '0') || (**ptr > '9')) && (**ptr != '+') && (**ptr != '-')) { if (**ptr == '\0') { add_error(s, TIMELIB_ERR_UNEXPECTED_DATA, "Found unexpected data"); @@ -571,6 +570,7 @@ static timelib_ull timelib_get_signed_nr(Scanner *s, const char **ptr, int max_l str[0] = '+'; /* First position is the sign */ str_ptr = str + 1; + while ((**ptr == '+') || (**ptr == '-')) { if (**ptr == '-') { str[0] = str[0] == '+' ? '-' : '+'; @@ -24870,7 +24870,7 @@ timelib_time *timelib_strtotime(const char *s, size_t len, timelib_error_contain in.errors->error_messages = NULL; if (len > 0) { - while (isspace((unsigned char)*s) && s < e) { + while (isspace((unsigned char)*s) && s <= e) { s++; } while (isspace((unsigned char)*e) && e > s) { diff --git a/ext/date/tests/bug35499.phpt b/ext/date/tests/bug35499.phpt index 84d979cf71e7..ba2cb0e05f0e 100644 --- a/ext/date/tests/bug35499.phpt +++ b/ext/date/tests/bug35499.phpt @@ -69,9 +69,11 @@ array(12) { array(0) { } ["error_count"]=> - int(0) + int(1) ["errors"]=> - array(0) { + array(1) { + [0]=> + string(12) "Empty string" } ["is_localtime"]=> bool(false)

« previous php.cvs (#141926) next »