diff --git a/src/VersionFeed.php b/src/VersionFeed.php index da6d8d5..1e3a7ab 100644 --- a/src/VersionFeed.php +++ b/src/VersionFeed.php @@ -97,7 +97,7 @@ public function getDiffList($highestVersion = null, $limit = 100) if (isset($previous)) { // Produce the diff fields for use in the template. if ($version->Title != $previous->Title) { - $diffTitle = HtmlDiff::compareHTML($version->Title, $previous->Title); + $diffTitle = HtmlDiff::compareHTML($version->Title ?? '', $previous->Title ?? ''); $version->DiffTitle = DBField::create_field('HTMLText', null); $version->DiffTitle->setValue( @@ -110,7 +110,7 @@ public function getDiffList($highestVersion = null, $limit = 100) } if ($version->Content != $previous->Content) { - $diffContent = HtmlDiff::compareHTML($version->Content, $previous->Content); + $diffContent = HtmlDiff::compareHTML($version->Content ?? '', $previous->Content ?? ''); $version->DiffContent = DBField::create_field('HTMLText', null); $version->DiffContent->setValue('