diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b5244e4230c04ade6f65a90f4b08b1c4b660b168..1a312ef01e66f7cc6bde98705962383fcbad905b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -585,3 +585,4 @@ Issue #2312243: Fixed Notice: Trying to get property of non-object in _workflow_ Issue #2304365 by mgadrat: Fixed error in Rules 'Set workflow value' action when using Workflow Node. Issue #2323025: Reverted deprecation of Rules Action 'Set a Workflow Field State'. Issue #2323025: Updated Rules Action 'Set a Workflow Field State'. +Issue #2317877: Fixed regression Fatal error: __clone method called on non-object in workflow.features.inc diff --git a/workflow.features.inc b/workflow.features.inc index d6a720eb09cfff12ec13ba38302dac98525d0fb4..168322b0c3f669235b0ac0093a2577398e85c0bb 100644 --- a/workflow.features.inc +++ b/workflow.features.inc @@ -52,7 +52,9 @@ class WorkflowFeaturesController extends EntityDefaultFeaturesController { $code[] = ''; foreach ($data as $identifier) { // Clone workflow to make sure changes are not propagated to original. - if ($workflow = clone entity_load_single($this->type, $identifier)) { + if ($workflow = entity_load_single($this->type, $identifier)) { + // Make sure data is not copied to the database. + $workflow = clone $workflow; // Modification for the Workflow object: // For mapping workflow_field, add original wid in case target system // already contains workflows.