diff --git a/code/Model/SiteTree.php b/code/Model/SiteTree.php index 2ee8e6b1d5..4d053e5fa0 100755 --- a/code/Model/SiteTree.php +++ b/code/Model/SiteTree.php @@ -1454,7 +1454,7 @@ public function MetaComponents() $tags['title'] = [ 'tag' => 'title', - 'content' => $this->obj('Title')->forTemplate() + 'content' => $this->obj('Title')?->forTemplate() ]; $generator = $this->getGenerator(); @@ -1601,7 +1601,7 @@ public function MetaTags($includeTitle = true) $tagString = implode("\n", $tags); if ($this->ExtraMeta) { - $tagString .= $this->obj('ExtraMeta')->forTemplate(); + $tagString .= $this->obj('ExtraMeta')?->forTemplate(); } $this->extend('updateMetaTags', $tagString);