File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ PHP NEWS
7
7
different type). (Derick)
8
8
. Fixed bug GH-8964 (DateTime object comparison after applying delta less
9
9
than 1 second). (Derick)
10
+ . Fixed bug #75035 (Datetime fails to unserialize "extreme" dates).
11
+ (Derick)
12
+ . Fixed bug #80483 (DateTime Object with 5-digit year can't unserialized).
13
+ (Derick)
10
14
. Fixed bug #81263 (Wrong result from DateTimeImmutable::diff). (Derick)
11
15
12
16
- DBA:
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #80483 (DateTime Object with 5-digit year can't unserialized)
3
+ --INI--
4
+ date.timezone=UTC
5
+ --FILE--
6
+ <?php
7
+
8
+ $ the_date = new DateTime ();
9
+ $ the_date ->SetTime (0 , 0 , 0 );
10
+ $ the_date ->SetDate (20201 , 01 , 01 );
11
+
12
+ var_dump ($ the_date );
13
+
14
+ $ serialized = serialize ($ the_date );
15
+ var_dump ($ serialized );
16
+ var_dump (unserialize ($ serialized ));
17
+ ?>
18
+ --EXPECTF--
19
+ object(DateTime)#%d (%d) {
20
+ ["date"]=>
21
+ string(28) "+20201-01-01 00:00:00.000000"
22
+ ["timezone_type"]=>
23
+ int(3)
24
+ ["timezone"]=>
25
+ string(3) "UTC"
26
+ }
27
+ string(116) "O:8:"DateTime":3:{s:4:"date";s:28:"+20201-01-01 00:00:00.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}"
28
+ object(DateTime)#%d (%d) {
29
+ ["date"]=>
30
+ string(28) "+20201-01-01 00:00:00.000000"
31
+ ["timezone_type"]=>
32
+ int(3)
33
+ ["timezone"]=>
34
+ string(3) "UTC"
35
+ }
You can’t perform that action at this time.
0 commit comments