-3

I have this error. Here Are my code. Can you help me please? ??? ? ? Line 149 is the last one :(

    $customer_group_info = $this->model_sale_customer_group->getCustomerGroup($order_info['customer_group_id']);

    if ($customer_group_info) {
        $this->data['customer_group'] = $customer_group_info['name'];
    } else {
        $this->data['customer_group'] = '';
    }

    $this->load->model('localisation/order_status');
    $this->data['order_status'] = $this->model_localisation_order_status->getOrderStatus($order_info['order_status_id'])['name'];
ben rudgers
  • 3,647
  • 2
  • 20
  • 32
T. C.
  • 3
  • 2

1 Answers1

1

Yo can't use a function that returns an array and use it's result directly. You have to bind the result to a variable, and then use it.

$temp = $this->model_localisation_order_status->getOrderStatus($order_info['order_status_id']);
$this->data['order_status'] = $temp['name'];

EDIT: duplicate of Access an Array Returned by a Function

Community
  • 1
  • 1
punkeel
  • 869
  • 8
  • 12