diff --git a/src/QUI/Bricks/Controls/SimpleContact.php b/src/QUI/Bricks/Controls/SimpleContact.php index 235471eddd048c570f41218be256b24c434f1c2d..43a64f21ec8b1b759cc3c7cf75d5352a3b7489a2 100644 --- a/src/QUI/Bricks/Controls/SimpleContact.php +++ b/src/QUI/Bricks/Controls/SimpleContact.php @@ -77,12 +77,14 @@ public function getBody() if ($useCaptcha && QUI::getPackageManager()->isInstalled('quiqqer/captcha')) { if (empty($_POST['quiqqer-captcha-response']) || !CaptchaHandler::isResponseValid($_POST['quiqqer-captcha-response'])) { - throw new QUI\Exception( - QUI::getLocale()->get( + $Engine->assign([ + 'errorMessage' => QUI::getLocale()->get( 'quiqqer/bricks', 'brick.control.simpleContact.error.captcha_failed' ) - ); + ]); + + $error = true; } } @@ -95,7 +97,9 @@ public function getBody() ]); $error = true; - } else { + } + + if (!$error) { try { $this->sendMail($Engine); } catch (\Exception $Exception) {