Merge branch '3.1' into 3

This commit is contained in:
github-actions 2024-02-15 11:15:35 +00:00
commit 331f9692cf
1 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ class VersionFeed extends SiteTreeExtension
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 @@ class VersionFeed extends SiteTreeExtension
}
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>');