The only place in the controller code you show, that references an index "title", is
Code:
$data['title'] = $data['post']['title'];
This must be line 59, no?
The error message suggests that $data['post'], which you get from
Code:
$this->Post_model->get_posts($slug);
is not returning an array with a 'title' element.
This sounds like the problem lies in your Post_model, or in the datait is retrieving.