From 4cf7c27103cdd62893b3bf78065ad1819cf331ad Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 15 Dec 2019 09:12:19 +0100 Subject: - add upstream patches for 7.3 and 7.4 - disable ZTS for now --- 7e8816a4be83c43f3a0b373fe3d619dff5bc5fd8.patch | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 7e8816a4be83c43f3a0b373fe3d619dff5bc5fd8.patch (limited to '7e8816a4be83c43f3a0b373fe3d619dff5bc5fd8.patch') diff --git a/7e8816a4be83c43f3a0b373fe3d619dff5bc5fd8.patch b/7e8816a4be83c43f3a0b373fe3d619dff5bc5fd8.patch new file mode 100644 index 0000000..748c6c9 --- /dev/null +++ b/7e8816a4be83c43f3a0b373fe3d619dff5bc5fd8.patch @@ -0,0 +1,35 @@ +From 7e8816a4be83c43f3a0b373fe3d619dff5bc5fd8 Mon Sep 17 00:00:00 2001 +From: USAMI Kenta +Date: Thu, 11 Jul 2019 18:23:23 +0900 +Subject: [PATCH] Fix return value when DateTimeImmutable::createFromFormat() + +--- + timecop_php7.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/timecop_php7.c b/timecop_php7.c +index 8d7faec..8493033 100644 +--- a/timecop_php7.c ++++ b/timecop_php7.c +@@ -1417,7 +1417,7 @@ static void _timecop_date_create_from_format(INTERNAL_FUNCTION_PARAMETERS, int i + { + zval *orig_timezone = NULL; + zval orig_format, orig_time, fixed_format, fixed_time, new_format, new_time; +- zval dt, now_timestamp, tmp; ++ zval dt, dti, now_timestamp, tmp; + char *orig_format_str, *orig_time_str; + size_t orig_format_len, orig_time_len; + tc_timeval now; +@@ -1440,6 +1440,12 @@ static void _timecop_date_create_from_format(INTERNAL_FUNCTION_PARAMETERS, int i + memchr(orig_format_str, '|', orig_format_len)) { + zval_ptr_dtor(&orig_format); + zval_ptr_dtor(&orig_time); ++ ++ if (immutable) { ++ call_php_method_with_1_params(NULL, TIMECOP_G(ce_DateTimeImmutable), "createfrommutable", &dti, &dt); ++ RETURN_ZVAL(&dti, 1, 1); ++ } ++ + RETURN_ZVAL(&dt, 1, 1); + } + -- cgit