From f727fe42031830c2d5100f6a51a3a04635e5213b Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Tue, 6 Aug 2013 16:37:08 +0200 Subject: [PATCH] set error message to form in addArticle action --- core/lib/Thelia/Action/Cart.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/lib/Thelia/Action/Cart.php b/core/lib/Thelia/Action/Cart.php index ab39d227b..7a055d4b2 100755 --- a/core/lib/Thelia/Action/Cart.php +++ b/core/lib/Thelia/Action/Cart.php @@ -113,6 +113,11 @@ class Cart implements EventSubscriberInterface $message = "Missing or invalid data"; } + + $cartAdd->setError(true); + $cartAdd->setErrorMessage($message); + + $event->setErrorForm($cartAdd); } private function getAddCartForm(Request $request)