From: Tim Düsterhus Date: Mon, 7 Nov 2011 13:18:03 +0000 (+0100) Subject: Disabled serializing of Singletons X-Git-Tag: 2.0.0_Beta_1~1583^2~5^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=32baee20f58f716f9304fd10994e1b80ef27c837;p=GitHub%2FWoltLab%2FWCF.git 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 --- diff --git a/wcfsetup/install/files/lib/system/SingletonFactory.class.php b/wcfsetup/install/files/lib/system/SingletonFactory.class.php index e182f7106e..337fd44884 100644 --- a/wcfsetup/install/files/lib/system/SingletonFactory.class.php +++ b/wcfsetup/install/files/lib/system/SingletonFactory.class.php @@ -1,5 +1,6 @@