Commit aaa870786c2 for php
commit aaa870786c23fd278f60702ca00a4579359f6934
Author: Ilija Tovilo <ilija.tovilo@me.com>
Date: Sun Oct 4 18:30:37 2026 +0200
Re-generate outdated parse_date.c file
diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c
index 1f92d7929f6..d1578c0e0f1 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 84d979cf71e..ba2cb0e05f0 100644
--- a/ext/date/tests/bug35499.phpt
+++ b/ext/date/tests/bug35499.phpt
@@ -69,9 +69,11 @@
array(0) {
}
["error_count"]=>
- int(0)
+ int(1)
["errors"]=>
- array(0) {
+ array(1) {
+ [0]=>
+ string(12) "Empty string"
}
["is_localtime"]=>
bool(false)