Error: Trying to access array offset on value of type null |
Hi CodeIgniters, i have an issue with one of my functions, locally there is working with no problems, when i upload on web server it gives me error :
A PHP Error was encountered Severity: Notice Message: Trying to access array offset on value of type null Filename: helpers/common_helper.php Line Number: 70 Backtrace: File: /var/www/html/application/helpers/common_helper.php Line: 70 Function: _error_handler File: /var/www/html/application/controllers/Gift.php Line: 115 Function: get_state_name_by_id File: /var/www/html/index.php Line: 315 Function: require_once --------------------------------------------- the function get_state_name_by_id is as follows function get_state_name_by_id($id){ $ci = & get_instance(); $ci->db->where('state_id',$id); return $ci->db->get('state')->row_array()['name']; } I use PHP Version 7.4.30 both locally and in web server |
Welcome Guest, Not a member yet? Register Sign In |