blob: 3fd500736d7b43e2c98d2cd847b4ea175ccd13b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--TEST--
Bug #70959 (ArrayObject unserialize does not restore protected fields)
--FILE--
<?php
class testObject extends ArrayObject {
protected $test;
public function getTest() {
return $this->test;
}
public function setTest($test) {
$this->test = $test;
}
}
$obj = new testObject();
$obj->setTest('test');
var_dump($obj->getTest());
$obj2 = unserialize(serialize($obj));
var_dump($obj2->getTest());
--EXPECTF--
string(4) "test"
string(4) "test"
|