Codeigniter PHP消息:数组到字符串转换

I got this error when I update the status of order from 1 to 2.

Message: Array to string conversion

Filename: database/DB_query_builder.php

Here's my Model:

public function confirm_order($status, $cart_id)
{
    $this->db->where('cart_id',$cart_id);
    $this->db->update('cart',$status);
    return $query->result();
}

My Controller:

public function confirm_order($cart_id)
{   
    $status = array
    (
        'status'=>2
    );
    $this->queries_order->confirm_order($cart_id,$status);
    redirect('get_order_details');
}

Seems OP have typo in parameter, swapping the position between two solved his problem.

confirm_order($cart_id,$status); should be changed to confirm_order($status, $cart_id);