I'm building a codeigniter app with sql server.
I started the app with MySQL and it worked fine but then when I merged my table to sql server I got this error :
Message: unserialize(): Error at offset 10 of 672 bytes
Filename: core/MY_Controller.php
Line Number: 3
Here's my controller.php
public function __construct()
{
parent::__construct();
$group_data = array();
if(empty($this->session->userdata('logged_in'))) {
$session_data = array('logged_in' => FALSE);
$this->session->set_userdata($session_data);
}
else {
$user_id = $this->session->userdata('id');
$this->load->model('model_groups');
$group_data = $this->model_groups->getUserGroupByUserId($user_id);
$this->data['user_permission'] = unserialize($group_data['permission']);
$this->permission = unserialize($group_data['permission']);
}
}