diff --git a/code/Model/SiteTree.php b/code/Model/SiteTree.php index e096acef..511bf4ae 100755 --- a/code/Model/SiteTree.php +++ b/code/Model/SiteTree.php @@ -741,13 +741,15 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi /** * Generates a link to edit this page in the CMS. * + * Implemented here to satisfy the CMSPreviewable interface, but data is intended to be loaded via Extension + * + * @see SilverStripe\Admin\CMSEditLinkExtension + * * @return string */ public function CMSEditLink() { - // This method has to be implemented here to satisfy the CMSPreviewable interface. - // See the actual implementation in CMSEditLinkExtension. - return $this->extend('CMSEditLink')[0]; + return $this->extend('CMSEditLink')[0] ?? ''; } /** diff --git a/composer.json b/composer.json index 278ea854..c18a7a9e 100644 --- a/composer.json +++ b/composer.json @@ -45,11 +45,14 @@ }, "autoload": { "psr-4": { - "SilverStripe\\CMS\\": ["code/", "_legacy/"], + "SilverStripe\\CMS\\": [ + "code/", + "_legacy/" + ], "SilverStripe\\CMS\\Tests\\": "code/php/", "SilverStripe\\CMS\\Tests\\Behaviour\\": "tests/behat/src/" } }, "prefer-stable": true, "minimum-stability": "dev" -} +} \ No newline at end of file