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 @@ -1766,7 +1766,7 @@ SPL_METHOD(Array, unserialize)
1766
1766
++ p ;
1767
1767
1768
1768
if (* p != 'm' ) {
1769
- if (* p != 'a' && * p != 'O' && * p != 'C' ) {
1769
+ if (* p != 'a' && * p != 'O' && * p != 'C' && * p != 'r' ) {
1770
1770
goto outexcept ;
1771
1771
}
1772
1772
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