Derick Rethans
f3441c832f
Merge branch 'PHP-8.1'
2022-05-26 15:19:34 +01:00
Derick Rethans
a04eccb294
Merge branch 'PHP-8.0' into PHP-8.1
2022-05-26 15:19:27 +01:00
Derick Rethans
dfd1d7a531
Fixed bug #76963 (Null-byte injection in createFromFormat)
2022-05-26 13:49:51 +01:00
Máté Kocsis
14da1cb909
Add support for class constants in stubs ( #7434 )
2022-05-22 22:27:23 +02:00
Derick Rethans
4f1b8f4828
Add serialisation support for the new 'include_end_date' property
2022-05-20 11:17:19 +01:00
Derick Rethans
c0c801d238
Fixed bug #52015 (Allow including end date in DatePeriod iterations)
2022-05-20 11:17:19 +01:00
Pavel Djundik
12702a2047
Add "N" and "o" format specifiers to idate()
2022-05-13 09:36:43 +01:00
Derick Rethans
1eab5b7970
GH-8458: DateInterval::createFromDateString does not throw non-relative items are present
2022-05-11 13:52:12 +01:00
Derick Rethans
5164f60c88
Merge branch 'PHP-8.1'
2022-05-05 15:24:14 +01:00
Derick Rethans
7670ee4342
Merge branch 'PHP-8.0' into PHP-8.1
2022-05-05 15:24:10 +01:00
Derick Rethans
92f8f19d50
Fixed GH-8471: Segmentation fault when converting immutable and mutable DateTime instances created using reflection
2022-05-05 12:10:50 +01:00
Derick Rethans
d54bcbb43b
Add DatePeriod's __serialize and __unserialize methods ( #8464 )
2022-05-03 22:06:17 +01:00
Derick Rethans
c1ad706b82
Fixed reference count issue with zend_string
2022-04-29 14:33:16 +01:00
Derick Rethans
5fb36414a3
Fixed cloning DateInterval
2022-04-29 10:27:40 +01:00
Derick Rethans
cae1d4adde
Add support for serialising all DateInterval objects
2022-04-29 10:27:40 +01:00
Derick Rethans
83a6bcc157
Fixed cloning DateInterval
2022-04-29 10:27:40 +01:00
Derick Rethans
c8a6a8abc0
Rename have_special_relative to from_string, fix serialisation constraint, and reorder fields
2022-04-29 10:27:40 +01:00
Derick Rethans
f4e5010aa9
Show the 'have_special_relative' property in var_dumps, and disallow serialization if set
2022-04-29 10:27:40 +01:00
Derick Rethans
76e852e7e8
Fixed memory leak with manual calls to DateInterval::__unserialize
2022-04-29 10:27:40 +01:00
Derick Rethans
f869a546e7
Add DateInterval's __serialize and __unserialize methods
2022-04-29 10:27:38 +01:00
Derick Rethans
3be8b5f5cb
Remove fake properties from DateInterval
2022-04-29 10:26:50 +01:00
Derick Rethans
6f2c5017f9
Fixed memory leak with unserialize was called multiple times and an abbreviation was stored
2022-04-29 09:44:27 +01:00
Derick Rethans
181623f9c0
Add DateTimeZone's __serialize and __unserialize methods
2022-04-29 09:44:27 +01:00
Derick Rethans
8b2ee5388c
Add DateTime/DateTimeImmutable's __serialize and __unserialize methods
2022-04-29 09:44:27 +01:00
Derick Rethans
36486106d9
Merge branch 'PHP-8.1'
2022-04-26 17:58:01 +01:00
Derick Rethans
97ffd75b13
Merge branch 'PHP-8.0' into PHP-8.1
2022-04-26 17:57:55 +01:00
Derick Rethans
b461c4673b
Use the new RETURN_THROWS() instead of just returning NULL
2022-04-26 17:57:47 +01:00
Derick Rethans
a7eda3d548
Merge branch 'PHP-8.1'
2022-04-26 16:45:07 +01:00
Derick Rethans
bc43e69822
Merge branch 'PHP-8.0' into PHP-8.1
2022-04-26 16:45:01 +01:00
Derick Rethans
87f341b1c2
Return early when the timezone info is NULL.
...
The guess_timezone function does throw an error, but throwing an error doesn't
immediate make the PHP_FUNCTION return.
This check is really only necessary for distributions that patch PHP's timelib
to use system tzdata, but not correct enough to account for their
implementation to guarantee to return a timezone.
2022-04-26 16:43:30 +01:00
Derick Rethans
731e3f6c96
Merge branch 'PHP-8.1'
2022-04-14 10:32:25 +01:00
Derick Rethans
ec0771c03f
Merge branch 'PHP-8.0' into PHP-8.1
2022-04-14 10:32:21 +01:00
Derick Rethans
e38d300a70
Refactor code to avoid duplication
2022-04-14 10:32:10 +01:00
Cody Mann
24085d0192
style/readability updates
2022-04-14 10:22:00 +01:00
Cody Mann
287c8a86b4
GH-7979: iterator advances when checking if valid
2022-04-14 10:22:00 +01:00
Derick Rethans
cd6c338c89
Merge branch 'PHP-8.1'
2022-04-01 13:28:13 +01:00
Derick Rethans
e6c4988187
Fixed #7752 , #8101 , #81660 : DateTimeZone::getTransitions() returns insufficient data
2022-04-01 13:28:05 +01:00
Christoph M. Becker
b7d90f09d4
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix #81500 : Interval serialization regression since 7.3.14 / 7.4.2
2021-10-15 19:14:00 +02:00
Christoph M. Becker
2e65c8e581
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix #81500 : Interval serialization regression since 7.3.14 / 7.4.2
2021-10-15 19:13:38 +02:00
Christoph M. Becker
fc886694d3
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #81500 : Interval serialization regression since 7.3.14 / 7.4.2
2021-10-15 19:11:26 +02:00
Christoph M. Becker
866adb122a
Fix #81500 : Interval serialization regression since 7.3.14 / 7.4.2
...
While it may not be desired, `DateInterval::$f` supports negative
values, at least with regard to calculations. We still need to guard
from assigning double values which are out of range for signed 64bit
integers (which would be undefined behavior). zend_dval_to_lval() does
this by returning `0` instead of triggering UB. This way we can avoid
setting the invalid marker, which doesn't work as expected anyway.
We must not do that only for unserialization, but also when the property
is set in the first place.
We need to adapt some of the existing tests wrt. this behavior. In
particular, we check for an arbitrary value in bug79015.phpt, to cater
to differences between 32bit and 64bit architectures.
Closes GH-7575.
2021-10-15 19:08:07 +02:00
Derick Rethans
0d6b8bbfcd
Merge branch 'PHP-8.1'
2021-10-05 15:23:05 +01:00
Derick Rethans
68b874d10d
Fixed bug #81504 : Incorrect timezone transition details for POSIX data
2021-10-05 15:22:55 +01:00
George Peter Banyard
0663c64f41
Voidify php_date_interval_initialize_from_hash()
2021-09-29 17:15:50 +01:00
George Peter Banyard
492980c540
Use bool/zend_result instead of int in Date extension
2021-09-29 17:15:50 +01:00
Nikita Popov
9d8f97d58d
Revert "Fix DATE_FORMAT_COOKIE definition"
...
This reverts commit ac34648cf6
.
As pointed out on GH-6783, the new format doesn't match any of
the specified formats. Previously the constant generated
Thursday, 14-Jul-2005 22:30:41 BST
which is obsolete. Now it generates
Thu, 14-Jul-2005 22:30:41 BST
which is not specified at all. The correct version would be:
Thu, 14 Jul 2005 22:30:41 BST
Reverting the change for now.
2021-09-29 09:26:40 +02:00
Mahmood Dhia
ac34648cf6
Fix DATE_FORMAT_COOKIE definition
...
In all of http://curl.haxx.se/rfc/cookie_spec.html ,
https://docs.microsoft.com/de-de/windows/win32/wininet/http-cookies
and https://tools.ietf.org/html/rfc7234#section-5.3 the cookie
datetime is specified as Mon, DD-Mon-YYYY HH:MM:SS GMT. However,
the current definition returns Monday, DD-Mon-YYY HH:MM:SS GMT.
Therefore, the "l" in "l, d-M-Y H:i:s T" must be changed to "D".
Closes GH-6783.
2021-09-23 16:01:04 +02:00
Derick Rethans
d9c8e5a42e
Fixed bug #80963 : DateTimeZone::getTransitions() truncated
2021-08-08 17:27:21 +01:00
Derick Rethans
84008782d3
Merge branch 'PHP-8.0'
2021-07-19 15:08:21 +01:00
Derick Rethans
9d0fb10823
Merge branch 'PHP-7.4' into PHP-8.0
2021-07-19 15:08:09 +01:00