Ilija Tovilo
4e8a6554cb
Fix failing date test
...
INCLUDE_END_DATE has only been introduced in PHP 8.2.
2022-10-20 10:48:57 +02:00
Derick Rethans
011b7f9840
Test for bug #78055 (DatePeriod's getRecurrences and ->recurrences don't match)
2022-10-19 16:02:49 +01:00
Derick Rethans
7b48053293
Fixed GH-9763: DateTimeZone ctr mishandles input and adds null byte if the argument is an offset larger than 100*60 minutes
2022-10-17 17:08:44 +01:00
Derick Rethans
962d8bd0b6
The data for Tehran has changed, update test
2022-08-11 16:26:33 +01:00
Derick Rethans
001e7dbb04
Fixed bug #80047 (DatePeriod doesn't warn with custom DateTimeImmutable)
2022-07-28 10:28:10 +01:00
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
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
287c8a86b4
GH-7979: iterator advances when checking if valid
2022-04-14 10:22:00 +01: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
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
Semen Dubina
959d3c9636
Add regression test for bug #76770
...
Closes GH-3514.
2020-12-23 16:47:08 +01:00
Máté Kocsis
d6264b0966
Verify parameter names of function aliases
...
Closes GH-6335
2020-10-16 10:56:33 +02:00
Derick Rethans
63289cfff3
Merge branch 'PHP-7.4' into PHP-8.0
2020-10-11 14:54:12 +01:00
Derick Rethans
34179ba809
Merge branch 'PHP-7.3' into PHP-7.4
2020-10-11 14:54:02 +01:00
Derick Rethans
1ed5a2a54d
Fixed test for bug #48097 due to confirmed data changes in timelib
2020-10-11 14:53:52 +01:00
Nikita Popov
cc58347105
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
XFAIL test broken by timelib update
2020-10-09 14:05:33 +02:00
Nikita Popov
229eb15f0e
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
XFAIL test broken by timelib update
2020-10-09 14:05:23 +02:00
Nikita Popov
5018581410
XFAIL test broken by timelib update
...
I was expecting this to get fixed quickly, but it didn't.
XFAIL for now.
2020-10-09 14:04:47 +02:00
Nikita Popov
25f1c405ff
Update ext/standard parameter names
...
Closes GH-6214.
2020-09-29 16:49:46 +02:00
Máté Kocsis
41b096b392
Promote a few forgotten warnings to exceptions
...
Closes GH-6211
2020-09-25 12:08:15 +02:00
Nikita Popov
c5401854fc
Run tidy
...
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00
George Peter Banyard
95f4ee38bb
Add some ValueErrors to ext/date
...
Closes GH-5613
2020-09-16 01:29:28 +02:00
Máté Kocsis
8e8a277b2f
Slightly improve error handling in DatePeriod::__construct()
2020-09-14 11:59:51 +02:00
Máté Kocsis
9975986b7e
Improve error messages mentioning parameters instead of arguments
...
Closes GH-5999
2020-09-09 10:47:43 +02:00
Derick Rethans
2ee2335249
Fixed bug #80057 (DateTimeImmutable::createFromFormat() does not populate time)
2020-09-04 15:55:08 +01:00
Derick Rethans
41e11a8e71
Merge branch 'PHP-7.3' into PHP-7.4
2020-08-31 12:31:44 +01:00
Derick Rethans
488e53c18b
Fixed test case
2020-08-31 12:31:23 +01:00
Derick Rethans
8ec906563c
Update timelib to 2020.02
2020-08-31 12:23:54 +01:00
Derick Rethans
0bc8785b61
Update timelib to 2020.01
2020-08-31 12:03:08 +01:00
Nikita Popov
ac98ac7225
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Don't assert when comparing uninit DateTimeZone objects
2020-08-27 16:20:24 +02:00
Nikita Popov
5ae657b296
Don't assert when comparing uninit DateTimeZone objects
...
Nothing guarantees that the objects are initialized here... just
check as usual.
2020-08-27 16:18:45 +02:00
Nikita Popov
988fc94bbb
Fix leak on failed DatePeriod initialization
...
We need to free not only p here, but also b and e.
2020-08-27 12:54:43 +02:00
Nikita Popov
e40c9d4918
Add some missing DatePeriod initialization checks
2020-08-13 17:23:23 +02:00
Nikita Popov
cdc4e49b84
Make strftime tests musl compatible
...
* Remove usage of strftime() in favor of date() in cases where
we are not specifically testing strftime(). We implement
date() ourselves, and as such are insulated from implementation-
defined behavior.
* Add skipif for broken strftime() %Z support. We have decided
not to work around the issue for musl using manual expansion,
as people should not be using this function anyway, and it is
slated for future deprecation.
* Don't test strftime() with invalid format specifier. The
behavior is implementation-dependent.
2020-08-13 12:02:27 +02:00
Máté Kocsis
7aacc705d0
Add many missing closing PHP tags to tests
...
Closes GH-5958
2020-08-09 22:03:36 +02:00