From 2ff35f78b8b21d2f43cf2fab1abed4616459b20c Mon Sep 17 00:00:00 2001 From: Nathan Date: Thu, 1 Dec 2016 14:41:13 +1100 Subject: [PATCH] FIX, the solr search service injector dependency causes issues with comparison since it has public variables that are stored in an array. --- code/dataobjects/DataChangeRecord.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/dataobjects/DataChangeRecord.php b/code/dataobjects/DataChangeRecord.php index 9f27727..e68b95f 100644 --- a/code/dataobjects/DataChangeRecord.php +++ b/code/dataobjects/DataChangeRecord.php @@ -90,6 +90,10 @@ public function getCMSFields($params = null) { $before = Object::create($this->ClassType, json_decode($this->Before, true), true); $after = Object::create($this->ClassType, json_decode($this->After, true), true); $diff = DataDifferencer::create($before, $after); + + // The solr search service injector dependency causes issues with comparison, since it has public variables that are stored in an array. + + $diff->ignoreFields(array('searchService')); $diffed = $diff->diffedData(); $diffText = '';