ENH Improve type safety to support refactored template layer

This commit is contained in:
Guy Sartorelli 2024-09-26 16:42:34 +12:00
parent bd48b04731
commit cde12faa81
No known key found for this signature in database

View File

@ -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);