Skip to content

Commit

Permalink
Merge branch '3.1' into 3
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 15, 2024
2 parents 7a5a919 + 935e1da commit 331f969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/VersionFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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('<div>'.$diffContent.'</div>');
Expand Down

0 comments on commit 331f969

Please sign in to comment.