diff -u b/src/Controller/Search404Controller.php b/src/Controller/Search404Controller.php --- b/src/Controller/Search404Controller.php +++ b/src/Controller/Search404Controller.php @@ -155,7 +155,7 @@ } // Construct the search form. - $build['search_form'] = $build['search_form'] = $this->formBuilder()->getForm(SearchPageForm::class, $entity); + $build['search_form'] = $this->formBuilder()->getForm(SearchPageForm::class, $entity); // Set the custom page text on the top of the results. $search_404_page_text = \Drupal::config('search404.settings')->get('search404_page_text');