Fix storing IMP_Compose in session on shutdown
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 14 Oct 2009 17:00:26 +0000 (11:00 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 14 Oct 2009 18:01:47 +0000 (12:01 -0600)
imp/lib/Compose.php

index 0013641..d6ae9b5 100644 (file)
@@ -119,6 +119,14 @@ class IMP_Compose
     protected function __construct($cacheid)
     {
         $this->_cacheid = $cacheid;
+        $this->__wakeup();
+    }
+
+    /**
+     * Code to run on unserialize().
+     */
+    public function __wakeup()
+    {
         register_shutdown_function(array($this, 'shutdown'));
     }