diff --git a/code/Model/SiteTreeLinkTracking.php b/code/Model/SiteTreeLinkTracking.php index 04385714f2..309e63e8fd 100644 --- a/code/Model/SiteTreeLinkTracking.php +++ b/code/Model/SiteTreeLinkTracking.php @@ -79,7 +79,7 @@ public function getParser() * @param SiteTreeLinkTracking_Parser $parser * @return $this */ - public function setParser(SiteTreeLinkTracking_Parser $parser = null) + public function setParser(?SiteTreeLinkTracking_Parser $parser = null) { $this->parser = $parser; return $this; diff --git a/code/Search/SearchForm.php b/code/Search/SearchForm.php index 95d3c72084..408cdd2c1f 100644 --- a/code/Search/SearchForm.php +++ b/code/Search/SearchForm.php @@ -52,10 +52,10 @@ class SearchForm extends Form * @param FieldList $actions Optional, defaults to a single field named "Go". */ public function __construct( - RequestHandler $controller = null, + ?RequestHandler $controller = null, $name = 'SearchForm', - FieldList $fields = null, - FieldList $actions = null + ?FieldList $fields = null, + ?FieldList $actions = null ) { if (!$fields) { $fields = new FieldList(