Can anyone help me with this error?
Notice: Trying to access array offset on value of type null in C:\xampp\htdocs\dev1\freelance\app\core\Controller.php on line 245
Notice: Trying to access array offset on value of type null in C:\xampp\htdocs\dev1\freelance\app\core\Controller.php on line 246
Notice: Trying to access array offset on value of type null in C:\xampp\htdocs\dev1\freelance\app\core\Controller.php on line 250
Notice: Trying to access array offset on value of type null in C:\xampp\htdocs\dev1\freelance\app\core\Controller.php on line 251
* This is the method from where you can pass data to the Header view
*
* @return string
*/
private function getHeader()
{
$data = [
'languages_list' => $this->languages,
'language' => $this->language
];
$data['url'] = $this->url[0];
/*Use User Library*/
$user = $this->library('User');
$data['user'] = $user->data();
$data['user_isloggedin'] = $user->isLoggedIn();
/*Use Client Model*/
$clientModel = $this->model('Client');
$data['client_unread_messages'] = $clientModel->unread_messages($data['user']['userid']);
$data['client_unread_notifications'] = $clientModel->unread_notifications($data['user']['userid']);
/*Use Freelancer Model*/
$freelancerModel = $this->model('Freelancer');
$data['freelancer_unread_messages'] = $freelancerModel->unread_messages($data['user']['userid']);
$data['freelancer_unread_notifications'] = $freelancerModel->unread_notifications($data['user']['userid']);
return $this->view->render($data, 'shared/header');
}