Index: context.plugins.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/context/Attic/context.plugins.inc,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 context.plugins.inc
--- context.plugins.inc	9 Feb 2010 17:05:22 -0000	1.1.2.4
+++ context.plugins.inc	4 May 2010 19:14:47 -0000
@@ -8,6 +8,17 @@ function _context_context_plugins() {
   $plugins = array();
 
   /**
+   * Base context object:
+   */
+  $plugins['context_object'] = array(
+    'handler' => array(
+      'path' => drupal_get_path('module', 'context') .'/plugins',
+      'file' => 'context_object.inc',
+      'class' => 'context_object',
+    ),
+  );
+
+  /**
    * Conditions.
    */
   $plugins['context_condition'] = array(
@@ -15,6 +26,7 @@ function _context_context_plugins() {
       'path' => drupal_get_path('module', 'context') .'/plugins',
       'file' => 'context_condition.inc',
       'class' => 'context_condition',
+      'parent' => 'context_object',
     ),
   );
   $plugins['context_condition_node'] = array(
@@ -114,6 +126,7 @@ function _context_context_plugins() {
       'path' => drupal_get_path('module', 'context') .'/plugins',
       'file' => 'context_reaction.inc',
       'class' => 'context_reaction',
+      'parent' => 'context_object',
     ),
   );
   $plugins['context_reaction_block'] = array(
Index: plugins/context_condition.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/context/plugins/Attic/context_condition.inc,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 context_condition.inc
--- plugins/context_condition.inc	26 Apr 2010 17:52:58 -0000	1.1.2.4
+++ plugins/context_condition.inc	4 May 2010 19:14:47 -0000
@@ -4,7 +4,7 @@
 /**
  * Base class for a context condition.
  */
-class context_condition {
+class context_condition extends context_object {
   var $plugin;
   var $title;
   var $description;
Index: plugins/context_object.inc
===================================================================
RCS file: plugins/context_object.inc
diff -N plugins/context_object.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugins/context_object.inc	4 May 2010 19:14:48 -0000
@@ -0,0 +1,26 @@
+<?php
+// $Id:  Exp $
+
+/**
+ * Base class for all other context objects.
+ */
+class context_object {
+
+  /**
+   * Clone our references when we're being cloned.
+   *
+   * PHP 5.3 performs 'shallow' clones when clone()'ing objects, meaning that
+   * any objects or arrays referenced by this object will not be copied, the
+   * cloned object will just reference our objects/arrays instead. By iterating
+   * over our properties and serializing and unserializing them, we force PHP to
+   * copy them.
+   */
+  function __clone() {
+    foreach ($this as $key => $val) {
+      if (is_object($val) || (is_array($val))) {
+        $this->{$key} = unserialize(serialize($val));
+      }
+    }
+  }
+
+}
Index: plugins/context_reaction.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/context/plugins/Attic/context_reaction.inc,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 context_reaction.inc
--- plugins/context_reaction.inc	26 Apr 2010 17:52:58 -0000	1.1.2.3
+++ plugins/context_reaction.inc	4 May 2010 19:14:48 -0000
@@ -4,7 +4,7 @@
 /**
  * Base class for a context reaction.
  */
-class context_reaction {
+class context_reaction extends context_object {
   var $plugin;
   var $title;
   var $description;
