diff --git a/src/DataDifferencer.php b/src/DataDifferencer.php index e8542045..0f589e68 100644 --- a/src/DataDifferencer.php +++ b/src/DataDifferencer.php @@ -112,7 +112,7 @@ public function diffedData() if (!($toField instanceof DBField)) { continue; } - $toValue = $toField->forTemplate(); + $toValue = $toField?->forTemplate(); // Show only to value if (!$this->fromRecord) { @@ -125,7 +125,7 @@ public function diffedData() if (!($fromField instanceof DBField)) { continue; } - $fromValue = $fromField->forTemplate(); + $fromValue = $fromField?->forTemplate(); // Show changes between the two, if any exist if ($fromValue != $toValue) { @@ -193,7 +193,7 @@ protected function getObjectDisplay($object = null) } // Format title - return $object->obj('Title')->forTemplate(); + return $object->obj('Title')?->forTemplate(); } /**