Commit graph

937 commits

Author SHA1 Message Date
Derick Rethans
b71d2e16e6 Fix GH-11416: Crash with DatePeriod when uninitialised objects are passed in (PHP 8.2+) 2023-08-09 16:10:14 +01:00
Derick Rethans
7f6e98cec7 Merge branch 'PHP-8.1' into PHP-8.2 2023-08-09 15:39:25 +01:00
Derick Rethans
4833b84854 Fix GH-11416: Crash with DatePeriod when uninitialised objects are passed in 2023-08-09 15:39:13 +01:00
Derick Rethans
1b5360587e Merge branch 'PHP-8.1' into PHP-8.2 2023-06-22 19:06:08 +01:00
Derick Rethans
0747616f84 Fixed GH-11368: Date modify returns invalid datetime 2023-06-22 17:58:19 +01:00
Niels Dossche
93becab506 Fix GH-11455: Segmentation fault with custom object date properties
Closes GH-11473.
2023-06-19 19:42:09 +02:00
nielsdos
caab608d57 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11281: DateTimeZone::getName() does not include seconds in offset
2023-05-23 18:56:40 +02:00
Niels Dossche
f9117eb824 Fix GH-11281: DateTimeZone::getName() does not include seconds in offset
If the seconds portion is non-zero, include the seconds in the output.

Closes GH-11282.
2023-05-23 18:52:07 +02:00
Derick Rethans
50ca489aa5 Merge branch 'PHP-8.1' into PHP-8.2 2023-03-23 14:49:18 +00:00
Derick Rethans
cbac68df6b Fix GH-10583: DateTime modify with tz pattern should not update linked timezone 2023-03-23 11:46:31 +00:00
Derick Rethans
ce5f75fb6f Fixed oss-fuzz #56931 2023-03-13 09:38:11 +00:00
Derick Rethans
a225581833 Fix GH-10747: Private and protected properties in serialized Date* objects throw 2023-03-10 14:39:22 +00:00
Derick Rethans
5d9ee8f920 Fixed OSS fuzz issues #55589, #55599, and #55727 2023-02-10 13:03:47 +00:00
Derick Rethans
cb907d50a8 Merge branch 'PHP-8.1' into PHP-8.2 2023-01-31 13:00:06 +00:00
Derick Rethans
a42bf93308 Fixed GH-10447: 'p' format specifier does not yield 'Z' for 00:00 2023-01-31 12:58:21 +00:00
Derick Rethans
85fbc6eaa6 Fix GH-10152: Custom properties of Date's child classes are not serialised 2023-01-31 12:53:03 +00:00
Derick Rethans
6b212b6dee Merge branch 'PHP-8.1' into PHP-8.2 2022-12-20 16:06:55 +00:00
Derick Rethans
d19a70c9a0 Fix GH-9891: DateTime modify with unixtimestamp (@) must work like setTimestamp 2022-12-20 14:41:13 +00:00
Derick Rethans
2e6b317fe3 Merge branch 'PHP-8.1' into PHP-8.2 2022-10-17 18:22:42 +01:00
Derick Rethans
25744dd73c Merge branch 'PHP-8.0' into PHP-8.1 2022-10-17 18:22:36 +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
f8b27c73c9 Use 'const' for fixed API 2022-09-14 16:40:06 +01:00
Derick Rethans
dd365b044a Add 'const' to match actual API 2022-09-14 11:02:26 +01:00
Bob Weinand
a01dd9feda Revert "Port all internally used classes to use default_object_handlers"
This reverts commit 94ee4f9834.

The commit was a bit too late to be included in PHP 8.2 RC1. Given it's a massive ABI break, we decide to postpone the change to PHP 8.3.
2022-09-14 11:13:23 +02:00
Derick Rethans
49c029858b Fixed error updating once more 2022-09-09 09:16:24 +01:00
Derick Rethans
f799bc4eca Don't return existing error_container/NULL, but use by-ref instead 2022-09-09 00:25:30 +01:00
Derick Rethans
8cdfffb753 Fixed MemorySanitizer: use-of-uninitialized-value warning introduced by 932586c426 2022-09-09 00:25:30 +01:00
Bob Weinand
94ee4f9834 Port all internally used classes to use default_object_handlers
Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2022-08-31 16:45:27 +02:00
Derick Rethans
932586c426 Fixed bug GH-9431: DateTime::getLastErrors() not returning false when no errors/warnings
For PHP 8.2 and later only.
2022-08-29 14:33:41 +01:00
Derick Rethans
534127d3b2 Merge branch 'PHP-8.1' 2022-07-28 11:49:00 +01:00
Derick Rethans
b0d67aa605 Merge remote-tracking branch 'derickr/bug80047-take2' into PHP-8.1 2022-07-28 11:48:30 +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
6ae86c2358 Fixed bug #80022: Support ISO 8601 years outside 0000-9999 range better 2022-07-22 15:34:57 +01:00
Máté Kocsis
e13d60c039
DatePeriod properties cannot be made readonly (#9013) 2022-07-19 10:20:45 +02:00
Derick Rethans
0dbedb3dbd Fixed memory leaks with DatePeriod::__unserialise 2022-07-18 23:58:19 +01:00
Derick Rethans
30cc0c1742 Merge branch 'PHP-8.1' 2022-06-25 17:53:33 +01:00
Derick Rethans
49a3cc63dd Merge branch 'PHP-8.0' into PHP-8.1 2022-06-25 17:53:26 +01:00
Derick Rethans
973c3f6e24 Fixed #80047: DatePeriod doesn't warn with custom DateTimeImmutable 2022-06-25 17:52:14 +01:00
Ilija Tovilo
e79046fbe4
Fix redundant ZSTR_VAL condition in php_date.c (#8753)
ZSTR_VAL can never be NULL as zend_string.val is a char[1] which will
always decay to a non-nullable pointer.

This fails with -Werror on newer gcc versions.
2022-06-12 10:59:37 +02:00
Máté Kocsis
debd38f851 Add support for sensitive parameters in stubs 2022-06-04 18:15:05 +02:00
Derick Rethans
63aa5a4b5d Improve error message, and add additional test. 2022-06-02 09:24:13 +01:00
Derick Rethans
c85fcbc218 Remove no longer used 'timezone_valid' flag 2022-06-02 09:24:13 +01:00
Derick Rethans
6770158d47 Only warn when an incorrect timezone is set through 'date.timezone' 2022-06-02 09:24:13 +01:00
Derick Rethans
e0d21297fe Update wording of warning message, and reinstate 'UTC' fallback for ctor 2022-06-02 09:24:13 +01:00
Derick Rethans
b3c6b540a1 Fixed bug #73239 (DateTime shows strange error message with invalid timezone) 2022-06-02 09:24:13 +01:00
Máté Kocsis
21fe72757c
Declare DatePeriod properties (#8534) 2022-05-28 08:43:10 +02:00
Derick Rethans
33fd554a33 Fixed merge due to changed return type in API 2022-05-27 16:51:44 +01:00
Derick Rethans
1400aa4fb5 Merge branch 'PHP-8.1' 2022-05-27 14:44:41 +01:00
Derick Rethans
f3d23d45c0 Merge branch 'PHP-8.0' into PHP-8.1 2022-05-27 14:44:06 +01:00