summaryrefslogtreecommitdiffstats
path: root/ab34c77a5a9c8611d1fc87601fcd72c9defb809d.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-12-15 09:12:19 +0100
committerRemi Collet <remi@remirepo.net>2019-12-15 09:12:19 +0100
commit4cf7c27103cdd62893b3bf78065ad1819cf331ad (patch)
treeab21e8ccb15a26507768c7d1094b6be2fce8294b /ab34c77a5a9c8611d1fc87601fcd72c9defb809d.patch
parent72eec8064d05740635548e1fa3e15e0206b2e564 (diff)
- add upstream patches for 7.3 and 7.4HEADmaster
- disable ZTS for now
Diffstat (limited to 'ab34c77a5a9c8611d1fc87601fcd72c9defb809d.patch')
-rw-r--r--ab34c77a5a9c8611d1fc87601fcd72c9defb809d.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/ab34c77a5a9c8611d1fc87601fcd72c9defb809d.patch b/ab34c77a5a9c8611d1fc87601fcd72c9defb809d.patch
new file mode 100644
index 0000000..9ca5605
--- /dev/null
+++ b/ab34c77a5a9c8611d1fc87601fcd72c9defb809d.patch
@@ -0,0 +1,27 @@
+From ab34c77a5a9c8611d1fc87601fcd72c9defb809d Mon Sep 17 00:00:00 2001
+From: USAMI Kenta <tadsan@zonu.me>
+Date: Thu, 11 Jul 2019 18:54:00 +0900
+Subject: [PATCH] Fix return value when DateTimeImmutable::createFromFormat()
+ for PHP 5
+
+---
+ timecop_php5.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/timecop_php5.c b/timecop_php5.c
+index 316d74a..5c16177 100644
+--- a/timecop_php5.c
++++ b/timecop_php5.c
+@@ -1520,6 +1520,12 @@ static void _timecop_date_create_from_format(INTERNAL_FUNCTION_PARAMETERS, int i
+
+ if (memchr(orig_format_str, '!', orig_format_len) ||
+ memchr(orig_format_str, '|', orig_format_len)) {
++
++ if (immutable) {
++ call_php_function_with_3_params(ORIG_FUNC_NAME("date_create_immutable_from_format"), &new_dt, &orig_format, &orig_time, orig_timezone);
++ RETURN_ZVAL(new_dt, 1, 1);
++ }
++
+ RETURN_ZVAL(dt, 1, 1);
+ }
+