From e279785301bbc83c6b786c46f952a54ba9e99947 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 26 Sep 2024 16:42:34 +1200 Subject: [PATCH] ENH Improve type safety to support refactored template layer --- code/Model/SiteTree.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/Model/SiteTree.php b/code/Model/SiteTree.php index 2ee8e6b1..4d053e5f 100755 --- a/code/Model/SiteTree.php +++ b/code/Model/SiteTree.php @@ -1454,7 +1454,7 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi $tags['title'] = [ 'tag' => 'title', - 'content' => $this->obj('Title')->forTemplate() + 'content' => $this->obj('Title')?->forTemplate() ]; $generator = $this->getGenerator(); @@ -1601,7 +1601,7 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi $tagString = implode("\n", $tags); if ($this->ExtraMeta) { - $tagString .= $this->obj('ExtraMeta')->forTemplate(); + $tagString .= $this->obj('ExtraMeta')?->forTemplate(); } $this->extend('updateMetaTags', $tagString);