File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -1778,7 +1778,7 @@ SPL_METHOD(Array, unserialize)
1778
1778
++ p ;
1779
1779
1780
1780
if (* p != 'm' ) {
1781
- if (* p != 'a' && * p != 'O' && * p != 'C' ) {
1781
+ if (* p != 'a' && * p != 'O' && * p != 'C' && * p != 'r' ) {
1782
1782
goto outexcept ;
1783
1783
}
1784
1784
intern -> ar_flags &= ~SPL_ARRAY_CLONE_MASK ;
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #62672 (Error on serialize of ArrayObject)
3
+ --FILE--
4
+ <?php
5
+
6
+ class ObjA
7
+ {
8
+ private $ _varA ;
9
+
10
+ public function __construct (Iterator $ source )
11
+ {
12
+ $ this ->_varA = $ source ;
13
+ }
14
+ }
15
+
16
+ class ObjB extends ObjA
17
+ {
18
+ private $ _varB ;
19
+
20
+ public function __construct (ArrayObject $ keys )
21
+ {
22
+ $ this ->_varB = $ keys ;
23
+ parent ::__construct ($ keys ->getIterator ());
24
+ }
25
+ }
26
+
27
+ $ obj = new ObjB (new ArrayObject ());
28
+
29
+ var_dump ($ obj == unserialize (serialize ($ obj )));
30
+ --EXPECTF --
31
+ bool (true )
You can’t perform that action at this time.
0 commit comments