From afcaac30b5b11beecd76f9313e582632f260fac3 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Mon, 26 Aug 2024 12:45:10 +1200 Subject: [PATCH] FIX Respect new typehints --- src/DataDifferencer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); } /**