diff --git a/src/Controllers/CMSPageHistoryViewerController.php b/src/Controllers/CMSPageHistoryViewerController.php index 47e1ee3..2c9cd01 100644 --- a/src/Controllers/CMSPageHistoryViewerController.php +++ b/src/Controllers/CMSPageHistoryViewerController.php @@ -4,6 +4,7 @@ use SilverStripe\CMS\Controllers\CMSMain; use SilverStripe\Forms\FieldList; +use SilverStripe\Forms\Form; use SilverStripe\Forms\HiddenField; use SilverStripe\VersionedAdmin\Forms\HistoryViewerField; @@ -29,9 +30,9 @@ class CMSPageHistoryViewerController extends CMSMain private static $ignore_menuitem = true; - public function getEditForm($id = null, $fields = null) + public function getEditForm($id = null, $fields = null): Form { - $record = $this->getRecord($id ?: $this->currentPageID()); + $record = $this->getRecord($id ?: $this->currentRecordID()); $form = parent::getEditForm($id); $form->addExtraClass('history-viewer__form');