Unhandled Error!

Trying to get property of non-object

Document Pay
Document type CMS page head
Line 3
Exception class Cms_ExecutionException

Code Highlight

<?php
    $checkoutProducts = array();
    $items = $order->items->as_array();
    foreach ( $items as $item ) {
        $checkoutProducts[] = array(
            'name' => $item->product->name,
            'id' => $item->product->sku,
            'price' => ($item->product->om('is_on_sale')) ? $item->product->om('sale_price') : $item->product->om('price'),
            'brand' => $item->product->manufacturer->name,
            'category' => $item->product->category_list->first()->name,
            'quantity' => $item->quantity,
        );
    }
# Document Type
3 Pay CMS page head
2 _header_checkout CMS partial
1 Checkout CMS template