Disabled serializing of Singletons
authorTim Düsterhus <timwolla@arcor.de>
Mon, 7 Nov 2011 13:18:03 +0000 (14:18 +0100)
committerTim Düsterhus <timwolla@arcor.de>
Mon, 7 Nov 2011 13:25:50 +0000 (14:25 +0100)
commit32baee20f58f716f9304fd10994e1b80ef27c837
tree5668a73513d8a1e4180b8d546f0675965db2a958
parent092e2f0855ea54798080669a64ab3ad8c547c08a
Disabled serializing of Singletons

$a = Test::getInstance();
$b = Test::getInstance();
echo 'A: '.$a->foo."\n"; // A: bar
echo 'B: '.$b->foo."\n"; // B: bar
$a->foo = 'a';
echo 'A: '.$a->foo."\n"; // A: a
echo 'B: '.$b->foo."\n"; // B: a
$b = unserialize(serialize($b)); // -> With this change SystemException
$a->foo = 'b';
echo 'A: '.$a->foo."\n"; // A: b
echo 'B: '.$b->foo."\n"; // B: a
wcfsetup/install/files/lib/system/SingletonFactory.class.php