diff --git a/commerce_license_billing.module b/commerce_license_billing.module index b74abb1..152a6c3 100644 --- a/commerce_license_billing.module +++ b/commerce_license_billing.module @@ -841,6 +841,9 @@ function commerce_license_billing_collect_charges(CommerceLicenseInterface $lice // a charge for the next billing cycle, it will already be gone by then. if (!$scheduled_for_cancellation) { $billing_cycle_type = entity_load_single('cl_billing_cycle_type', $billing_cycle->type); + if(!$billing_cycle_type) { + return; + } $next_billing_cycle = $billing_cycle_type->getNextBillingCycle($billing_cycle, FALSE); $charges[] = array( 'quantity' => 1,