diff --git a/core/lib/Drupal/Core/Form/FormErrorInterface.php b/core/lib/Drupal/Core/Form/FormErrorInterface.php index c642ed3..e203908 100644 --- a/core/lib/Drupal/Core/Form/FormErrorInterface.php +++ b/core/lib/Drupal/Core/Form/FormErrorInterface.php @@ -92,15 +92,15 @@ * would be triggered if the input processing and validation steps were fully * skipped. * - * @param $name + * @param string $name * The name of the form element. If the #parents property of your form * element is array('foo', 'bar', 'baz') then you may set an error on 'foo' * or 'foo][bar][baz'. Setting an error on 'foo' sets an error for every * element where the #parents array starts with 'foo'. * @param array $form_state * An associative array containing the current state of the form. - * @param $message - * The error message to present to the user. + * @param string $message + * (optional) The error message to present to the user. * * @return mixed * Return value is for internal use only. To get a list of errors, use diff --git a/core/modules/search/lib/Drupal/search/Form/SearchBlockForm.php b/core/modules/search/lib/Drupal/search/Form/SearchBlockForm.php index eadc2dd..c943c93 100644 --- a/core/modules/search/lib/Drupal/search/Form/SearchBlockForm.php +++ b/core/modules/search/lib/Drupal/search/Form/SearchBlockForm.php @@ -72,7 +72,7 @@ public function submitForm(array &$form, array &$form_state) { ); } else { - $this->setFormError(NULL, $form_state, $this->t('Search is currently disabled.'), 'error'); + $this->setFormError('', $form_state, $this->t('Search is currently disabled.'), 'error'); } } }