diff --git a/sites/all/modules/paddle/workbench_moderation/workbench_moderation.module b/sites/all/modules/paddle/workbench_moderation/workbench_moderation.module index 653025e..6022bfe 100644 --- a/sites/all/modules/paddle/workbench_moderation/workbench_moderation.module +++ b/sites/all/modules/paddle/workbench_moderation/workbench_moderation.module @@ -1569,7 +1569,9 @@ function workbench_moderation_moderate($node, $state) { // - If we are moving to unpublished state we should make sure the published // revision is the 'current' revision. if (!empty($node->workbench_moderation['published']) || !empty($node->workbench_moderation['current']->unpublishing)) { - drupal_register_shutdown_function('workbench_moderation_store', $node); + // Clone the node to make sure our data arrives intact in the shutdown + // function. It might still be altered before the shutdown is reached. + drupal_register_shutdown_function('workbench_moderation_store', clone $node); } // Notify other modules that the state was changed.