From 4447dbcd9a352521c967c20d7558f10fb5d05c8f Mon Sep 17 00:00:00 2001 From: gmorel Date: Sat, 23 Nov 2013 22:29:15 +0100 Subject: [PATCH] Coupon : Fix the error if a given coupon leads to an unknown service id --- core/lib/Thelia/Coupon/CouponFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/Thelia/Coupon/CouponFactory.php b/core/lib/Thelia/Coupon/CouponFactory.php index fbbfa6a8a..99388a7e0 100644 --- a/core/lib/Thelia/Coupon/CouponFactory.php +++ b/core/lib/Thelia/Coupon/CouponFactory.php @@ -84,7 +84,7 @@ class CouponFactory /** @var CouponInterface $couponInterface */ $couponInterface = $this->buildCouponManagerFromModel($couponModel); - if ($couponInterface->getConditions()->isEmpty()) { + if ($couponInterface && $couponInterface->getConditions()->isEmpty()) { throw new InvalidConditionException( get_class($couponInterface) );