From 45adf23bd9944ae543f953ded71ba09bedef9921 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Wed, 16 Apr 2014 08:45:50 +0200 Subject: [PATCH] update OrderDelivery form --- core/lib/Thelia/Form/OrderDelivery.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/lib/Thelia/Form/OrderDelivery.php b/core/lib/Thelia/Form/OrderDelivery.php index 37172612a..6216afc24 100644 --- a/core/lib/Thelia/Form/OrderDelivery.php +++ b/core/lib/Thelia/Form/OrderDelivery.php @@ -83,13 +83,13 @@ class OrderDelivery extends BaseForm if (null === $module) { $context->addViolation(Translator::getInstance()->trans("Delivery module ID not found")); - } - - $moduleReflection = new \ReflectionClass($module->getFullNamespace()); - if ($moduleReflection->isSubclassOf("Thelia\Module\DeliveryModuleInterface") === false) { - $context->addViolation( - sprintf(Translator::getInstance()->trans("delivery module %s is not a Thelia\Module\DeliveryModuleInterface"), $module->getCode()) - ); + } else { + $moduleReflection = new \ReflectionClass($module->getFullNamespace()); + if ($moduleReflection->isSubclassOf("Thelia\Module\DeliveryModuleInterface") === false) { + $context->addViolation( + sprintf(Translator::getInstance()->trans("delivery module %s is not a Thelia\Module\DeliveryModuleInterface"), $module->getCode()) + ); + } } }