ErrorException Trying to access array offset on value of type null |
You just missed the parameter, the correct function should be:
public function getAccess($menu) { $queryMenu = $this->getIdMenu($menu); $id_menu = $queryMenu['id_user_menu']; } Also check 1 more thing: Be sure that you are returning a valid value from getIdMenu($menu) function. For this sake, you have exceptions or a more simple way, a condition. Something like this: public function getIdMenu($menu){ Here goes the code before this part $variable = this->db->get(); $result = $variable->row_array(); if(!empty($result['id_user_menu'])) return $result; return FALSE; } |
Messages In This Thread |
ErrorException Trying to access array offset on value of type null - by mrardiyansyah - 09-08-2020, 08:08 AM
RE: ErrorException Trying to access array offset on value of type null - by Omar Crespo - 09-09-2020, 03:57 PM
RE: ErrorException Trying to access array offset on value of type null - by mrardiyansyah - 09-10-2020, 05:52 AM
RE: ErrorException Trying to access array offset on value of type null - by Omar Crespo - 09-10-2020, 09:09 AM
RE: ErrorException Trying to access array offset on value of type null - by digindia - 06-24-2022, 03:13 AM
|