Welcome Guest, Not a member yet? Register   Sign In
Undefined Offset:0 under Helper

I am encountering an Error:
A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 0
Filename: helpers/ompty_helper.php
Line Number: 9

Here's line Numer 9: "$resto_web_apps_info = $resto_web_apps_info[0]->$structure;"

The model contains:
function get_resto_web_apps_info($general_id, $web_app_name, $structure){
return $this->db->select('rwi.'.$structure)
->from('restaurant_web_apps_info as rwi')
->join('restaurant_web_apps as r', 'r.id = rwi.restaurant_web_apps_id', 'left outer')
->where('r.web_app_name', $web_app_name)
->where('rwi.general_restaurant_info_id', $general_id)

I've been calling this function multiple times but I get this only in one part of my code. What could be the possible problem?

Can you post your helper code .. this error says, that in $resto_web_apps_info[0] is nothing, so you have to check first if your array has a value.


just try result_array() in your model

Theme © iAndrew 2016 - Forum software by © MyBB