Coupon : Fix the error if a given coupon leads to an unknown service id

This commit is contained in:
gmorel
2013-11-23 22:29:15 +01:00
parent f40476e3ea
commit 4447dbcd9a

View File

@@ -84,7 +84,7 @@ class CouponFactory
/** @var CouponInterface $couponInterface */ /** @var CouponInterface $couponInterface */
$couponInterface = $this->buildCouponManagerFromModel($couponModel); $couponInterface = $this->buildCouponManagerFromModel($couponModel);
if ($couponInterface->getConditions()->isEmpty()) { if ($couponInterface && $couponInterface->getConditions()->isEmpty()) {
throw new InvalidConditionException( throw new InvalidConditionException(
get_class($couponInterface) get_class($couponInterface)
); );