Improved error handling in search form
authorMarcel Werk <burntime@woltlab.com>
Fri, 8 May 2015 11:00:25 +0000 (13:00 +0200)
committerMarcel Werk <burntime@woltlab.com>
Fri, 8 May 2015 11:00:25 +0000 (13:00 +0200)
wcfsetup/install/files/lib/form/SearchForm.class.php

index 9119a4753c70c88e8a6815c2534326939319cf52..6e51248796935343bb79ee14216ff820d9a1fe01 100644 (file)
@@ -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()
         */