From 32baee20f58f716f9304fd10994e1b80ef27c837 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 7 Nov 2011 14:18:03 +0100 Subject: [PATCH] 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 --- .../install/files/lib/system/SingletonFactory.class.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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 @@