Horde_Registry should never be serialized.
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 30 Jun 2010 20:31:40 +0000 (14:31 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 30 Jun 2010 20:31:40 +0000 (14:31 -0600)
framework/Core/lib/Horde/Registry.php

index ca1f102..b6e7007 100644 (file)
@@ -422,6 +422,16 @@ class Horde_Registry
     }
 
     /**
+     * serialize() should never be called on this object. If it is, die.
+     *
+     * @throws Horde_Exception
+     */
+    public function __sleep()
+    {
+        throw new Horde_Exception('Horde_Registry objects should never be serialized.');
+    }
+
+    /**
      * Clear the registry cache.
      */
     public function clearCache()