diff --git a/Layout/default/Emailtemplates/order/int_billing_info.php b/Layout/default/Emailtemplates/order/int_billing_info.php index 42f431b35..4c5bbd447 100644 --- a/Layout/default/Emailtemplates/order/int_billing_info.php +++ b/Layout/default/Emailtemplates/order/int_billing_info.php @@ -23,9 +23,13 @@ .$order->owner->customer_number." - " .str_replace("\n", "", str_replace("\r\n", " ", $order->owner->getCompanyOrName())); */ - $subject .= $order->terminations[0]->building->network->name." - " - .$order->owner->customer_number." - " - .str_replace("\n", "", str_replace("\r\n", " ", $order->owner->getCompanyOrName())); + + if(is_array($order->terminations) && count($order->terminations)) { + $subject .= $order->terminations[0]->building->network->name." - "; + } + + $subject .= $order->owner->customer_number." - " + .str_replace("\n", "", str_replace("\r\n", " ", $order->owner->getCompanyOrName())); $this->setReturnValue([ 'subject' => $subject,