From ad8fa59e9a8a5b8f91a701d9750aaf74e61a598d Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Wed, 3 Jul 2013 10:11:40 +0200 Subject: [PATCH] put form in error if saving customer fails --- core/lib/Thelia/Action/Customer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/lib/Thelia/Action/Customer.php b/core/lib/Thelia/Action/Customer.php index d0c96eef5..31bfd16ab 100755 --- a/core/lib/Thelia/Action/Customer.php +++ b/core/lib/Thelia/Action/Customer.php @@ -68,9 +68,11 @@ class Customer implements EventSubscriberInterface ); } catch (\PropelException $e) { Tlog::getInstance()->error(sprintf('error during creating customer on action/createCustomer with message "%s"', $e->getMessage())); + $event->setFormError($form); } - echo "ok"; exit; + //Customer is create, he is automatically connected + } else { $event->setFormError($form);