Derick Rethans
85f3a969dc
Revert "Fixed #80047 : DatePeriod doesn't warn with custom DateTimeImmutable"
...
This reverts commit 973c3f6e24
.
2022-07-28 10:13:54 +01:00
Derick Rethans
973c3f6e24
Fixed #80047 : DatePeriod doesn't warn with custom DateTimeImmutable
2022-06-25 17:52:14 +01:00
Derick Rethans
b23dfe4986
Skip tests on 32-bit
2022-06-17 09:34:27 +01:00
Derick Rethans
36990aab8e
Fixed bug #77243 (Weekdays are calculated incorrectly for negative years)
2022-06-17 09:34:27 +01:00
Derick Rethans
d5e57268a9
Fixed bug #78139 (timezone_open accepts invalid timezone string argument).
2022-05-27 14:43:04 +01:00
Derick Rethans
6418eba1cd
Fixed bug #74671 (DST timezone abbreviation has incorrect offset)
2022-05-27 09:33:20 +01:00
Matteo Beccati
b90201745f
Fixed test
2022-05-27 08:36:56 +02:00
Derick Rethans
209ea3ffc7
Fixed tests
2022-05-26 14:30:22 +01:00
Derick Rethans
2dcd82162e
Fixed bug #72963 (Null-byte injection in CreateFromFormat and related functions)
2022-05-26 13:49:51 +01:00
Derick Rethans
dfd1d7a531
Fixed bug #76963 (Null-byte injection in createFromFormat)
2022-05-26 13:49:51 +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
b461c4673b
Use the new RETURN_THROWS() instead of just returning NULL
2022-04-26 17:57:47 +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
c854bb2472
Fixed GH-8400: bug73837.phpt makes no sense
...
Replaces the indeed silly test with something that actually does the job,
albeit much slower.
2022-04-22 10:29:37 +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
7aefee1613
Updated to version 2022.1 (2022a)
2022-04-07 10:45:19 +01:00
Derick Rethans
4ec9d07cc3
Updated to version 2021.5 (2021e)
2021-11-03 15:49:25 +00: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
b230593b0e
Merge branch 'PHP-7.4' into PHP-8.0
2021-10-08 13:52:18 +01:00
Derick Rethans
9733d49e14
Remove now superfluous tests due to changes in tzdata
2021-10-08 13:51:21 +01:00
Derick Rethans
c55b41d658
Updated to version 2021.3 (2021c)
2021-10-08 12:54:53 +01:00
Derick Rethans
8a61f1ece6
Updated to version 2021.3 (2021c)
2021-10-08 12:54:52 +01:00
Christoph M. Becker
fac3fbcb07
Fix OOB read due to timezone_open() with 5 digit offset
...
This has been reported as bug #78984 , and is generally and properly
fixed as of timelib 2020.3 (PHP-8.0). However, it is not fixed in
PHP-7.4, where the test results in an OOB read, and an unterminated
C string when calling `::getName()`. Therefore, we apply a minimal
fix which just avoids this dangerous behavior.
2021-09-17 13:18:51 +02:00
Derick Rethans
4aeff60f34
Upgrade timelib to version 2020.03
2021-08-08 12:11:18 +01:00
Derick Rethans
9d0fb10823
Merge branch 'PHP-7.4' into PHP-8.0
2021-07-19 15:08:09 +01:00
Derick Rethans
26b1572d37
Move date timezone cache destruction to post deactivate
...
Some extensions try to use the date features in their own shutdown,
most notably some logging functions. Because of that, move the
cache tear down until after these resources have been cleaned up.
2021-07-19 15:07:01 +01:00
Derick Rethans
fee80e397d
Updated to version 2021.1 (2021a)
2021-01-25 10:44:06 +00:00
Derick Rethans
3f183bbcf8
Updated to version 2021.1 (2021a)
2021-01-25 10:44:05 +00:00
Nikita Popov
c31f9f7ee4
Sync date_diff and DateTime::diff return type
...
This function/method cannot return false.
2021-01-18 14:39:32 +01:00
Máté Kocsis
46a2c6a8d7
Fix return type of DateTimeImmutable::__set_state()
2020-12-28 14:45:13 +01:00
Christoph M. Becker
269936e680
DateTime*::getOffset() no longer returns false as of PHP 8.0.0
...
Cf. <https://github.com/php/doc-en/pull/282 >.
Closes GH-6539.
2020-12-26 15:13:05 +01:00
Semen Dubina
959d3c9636
Add regression test for bug #76770
...
Closes GH-3514.
2020-12-23 16:47:08 +01:00
Derick Rethans
288332077f
Fixed bug #80376 (last day of the month causes runway cpu usage)
2020-12-21 10:31:41 +00:00
Derick Rethans
b043759cb4
Fixed bug #80376 (last day of the month causes runway cpu usage)
2020-12-21 10:30:40 +00:00
Christoph M. Becker
32c6c29d79
Revert "DateTime:: and DateTimeImmutable::getTimestamp() may return false"
...
This reverts commit b67c232189
.
2020-12-20 23:07:02 +01:00
Christoph M. Becker
b67c232189
DateTime:: and DateTimeImmutable::getTimestamp() may return false
2020-12-20 19:32:12 +01:00
Christoph M. Becker
3c68f43251
Fix ext/date stubs
...
Closes GH-6523.
2020-12-20 18:14:20 +01:00
Christoph M. Becker
b678df5dc8
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #80280 : ADD_EXTENSION_DEP() fails for ext/standard and ext/date
2020-10-26 11:06:10 +01:00
Christoph M. Becker
8b59e4e897
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #80280 : ADD_EXTENSION_DEP() fails for ext/standard and ext/date
2020-10-26 11:05:22 +01:00
Christoph M. Becker
2be27074b6
Fix #80280 : ADD_EXTENSION_DEP() fails for ext/standard and ext/date
...
`ADD_EXTENSION_DEP()` relies on the `PHP_<extname>` config variables to
be set to `"yes"`, and since the standard and date extension are always
enabled, we define the respective variables uncoditionally.
Closes GH-6383.
2020-10-26 11:03:05 +01:00
Máté Kocsis
47bbfe1fc0
Require stubs to declare return types for magic methods when possible
...
Closes GH-6376
2020-10-23 16:33:16 +02:00
Derick Rethans
5eb6f593ee
Updated to version 2020.4 (2020d)
2020-10-22 10:12:27 +01:00
Derick Rethans
4ea01bdc67
Updated to version 2020.4 (2020d)
2020-10-22 10:12:26 +01:00
Derick Rethans
d4200ba6cf
Updated to version 2020.4 (2020d)
2020-10-22 10:12:24 +01:00
Derick Rethans
d0c2db4179
Updated to version 2020.3 (2020c)
2020-10-19 09:31:04 +01:00
Derick Rethans
a4c1a43a5b
Updated to version 2020.3 (2020c)
2020-10-19 09:31:03 +01:00
Derick Rethans
7b5f232b03
Updated to version 2020.3 (2020c)
2020-10-19 09:31:02 +01:00