diff --git a/code/FormSchemaController.php b/code/FormSchemaController.php index e5e120934..409a9f9ab 100644 --- a/code/FormSchemaController.php +++ b/code/FormSchemaController.php @@ -111,7 +111,7 @@ public function schema(HTTPRequest $request): HTTPResponse * @param ValidationResult $errors Required for 'error' response * @param array $extraData Any extra data to be merged with the schema response */ - public function getSchemaResponse(string $schemaID, ?Form $form = null, ValidationResult $errors = null, array $extraData = []): HTTPResponse + public function getSchemaResponse(string $schemaID, ?Form $form = null, ?ValidationResult $errors = null, array $extraData = []): HTTPResponse { $parts = $this->getRequest()->getHeader(static::SCHEMA_HEADER); $data = $this diff --git a/code/Forms/LinkFormFactory.php b/code/Forms/LinkFormFactory.php index 193bb3260..f16d804b7 100644 --- a/code/Forms/LinkFormFactory.php +++ b/code/Forms/LinkFormFactory.php @@ -27,7 +27,7 @@ abstract class LinkFormFactory implements FormFactory * @param array $context * @return Form */ - public function getForm(RequestHandler $controller = null, $name = FormFactory::DEFAULT_NAME, $context = []) + public function getForm(?RequestHandler $controller = null, $name = FormFactory::DEFAULT_NAME, $context = []) { // Validate context foreach ($this->getRequiredContext() as $required) {