put form in error if saving customer fails
This commit is contained in:
@@ -68,9 +68,11 @@ class Customer implements EventSubscriberInterface
|
|||||||
);
|
);
|
||||||
} catch (\PropelException $e) {
|
} catch (\PropelException $e) {
|
||||||
Tlog::getInstance()->error(sprintf('error during creating customer on action/createCustomer with message "%s"', $e->getMessage()));
|
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 {
|
} else {
|
||||||
|
|
||||||
$event->setFormError($form);
|
$event->setFormError($form);
|
||||||
|
|||||||
Reference in New Issue
Block a user