1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Commit Graph

2263 Commits

Author SHA1 Message Date
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
Máté Kocsis d6264b0966 Verify parameter names of function aliases
Closes GH-6335
2020-10-16 10:56:33 +02:00
Máté Kocsis 186612e4d7 Improve parameter names in ext/intl
Closes GH-6309
2020-10-12 18:06:45 +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
Derick Rethans 2180e882f3 Updated to version 2020.2 (2020b) 2020-10-08 15:19:48 +01:00
Derick Rethans 950157942e Updated to version 2020.2 (2020b) 2020-10-08 15:19:47 +01:00
Derick Rethans 14d231bd16 Updated to version 2020.2 (2020b) 2020-10-08 15:19:46 +01:00
Derick Rethans 088d284d9f Updated to version 2020.2 (2020b) 2020-10-08 15:05:40 +01:00
Derick Rethans c8929dc17e Updated to version 2020.2 (2020b) 2020-10-08 15:05:39 +01:00
Derick Rethans 90a5d7c2ad Updated to version 2020.2 (2020b) 2020-10-08 15:05:38 +01: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