From 5aaea769d0e6e6e35b25ed45673b0e07c0542f31 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 8 May 2015 13:00:25 +0200 Subject: [PATCH] Improved error handling in search form --- wcfsetup/install/files/lib/form/SearchForm.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wcfsetup/install/files/lib/form/SearchForm.class.php b/wcfsetup/install/files/lib/form/SearchForm.class.php index 9119a4753c..6e51248796 100644 --- a/wcfsetup/install/files/lib/form/SearchForm.class.php +++ b/wcfsetup/install/files/lib/form/SearchForm.class.php @@ -296,6 +296,18 @@ class SearchForm extends AbstractCaptchaForm { } } + /** + * @see wcf\form\IForm::submit() + */ + public function submit() { + try { + parent::submit(); + } + catch (NamedUserException $e) { + WCF::getTPL()->assign('errorMessage', $e->getMessage()); + } + } + /** * @see \wcf\form\IForm::save() */ -- 2.20.1