From dfc1598de06cc0a934c9444f9af49b4803d89ad7 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 17 Jun 2009 03:42:24 +0000 Subject: [PATCH] ENHANCEMENT: Added better support for using DataDifferencer to look at new records. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79404 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/DataDifferencer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/model/DataDifferencer.php b/core/model/DataDifferencer.php index 96c852cfd..2d87670e9 100644 --- a/core/model/DataDifferencer.php +++ b/core/model/DataDifferencer.php @@ -113,8 +113,8 @@ class DataDifferencer extends ViewableData { 'Diff' => $this->fromRecord ? Diff::compareHTML($this->fromRecord->$field, $this->toRecord->$field) : "" . $this->toRecord->$field . "", - 'From' => $this->fromRecord->$field, - 'To' => $this->toRecord->$field, + 'From' => $this->fromRecord ? $this->fromRecord->$field : null, + 'To' => $this->toRecord ? $this->toRecord->$field : null, ))); } }