Coupon : Fix the error if a given coupon leads to an unknown service id
This commit is contained in:
@@ -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)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user