File tree Expand file tree Collapse file tree 2 files changed +33
-4
lines changed Expand file tree Collapse file tree 2 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,6 @@ PHP NEWS
37
37
- CURL:
38
38
. Fixed bug #62839 (curl_copy_handle segfault with CURLOPT_FILE). (Pierrick)
39
39
40
- - DateTime:
41
- . Fixed bug #62852 (Unserialize invalid DateTime causes crash).
42
-
43
-
44
40
- Intl:
45
41
. Fix null pointer dereferences in some classes of ext/intl. (Gustavo)
46
42
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #62852 (Unserialize invalid DateTime causes crash)
3
+ --INI--
4
+ date.timezone=GMT
5
+ --XFAIL--
6
+ bug is not fixed yet
7
+ --FILE--
8
+ <?php
9
+ $ s1 = 'O:8:"DateTime":3:{s:4:"date";s:20:"10007-06-07 03:51:49";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";} ' ;
10
+ $ s2 = 'O:3:"Foo":3:{s:4:"date";s:20:"10007-06-07 03:51:49";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";} ' ;
11
+
12
+ global $ foo ;
13
+
14
+ class Foo extends DateTime {
15
+ function __wakeup () {
16
+ global $ foo ;
17
+ $ foo = $ this ;
18
+ parent ::__wakeup ();
19
+ }
20
+ }
21
+
22
+ // Old test case
23
+ try {
24
+ unserialize ( $ s1 );
25
+ } catch ( Exception $ e ) {}
26
+
27
+ // My test case
28
+ try {
29
+ unserialize ( $ s2 );
30
+ } catch ( Exception $ e ) {}
31
+ var_dump ( $ foo );
32
+ ?>
33
+ --EXPECTF--
You can’t perform that action at this time.
0 commit comments