Welcome Guest, Not a member yet? Register   Sign In
rying to access array offset on value of type null" at line 3460 in this code snippet
#1

(This post was last modified: 03-17-2023, 04:54 AM by TeetharKehar.)

What could be causing a PHP notice of "Trying to access array offset on value of type null" at line 3460 in this code snippet?
Code:
for ($i = 0; $i < $iCount; $i++) {
    if ($row[$i]['id'] == NULL)    //This line is causing the error
        continue;
    $bcs = @(implode(',', array_intersect_key($_SESSION['business_components'], array_flip(explode(',', $row[$i]['bc'])))));
    $this->db->set('business_component_txt', $bcs);
    $id = $row[$i]['id'];
    $this->db->where('id', $id);  //this is the id of the row we are updating
    $this->db->update('rental');
}
Reply


Messages In This Thread
rying to access array offset on value of type null" at line 3460 in this code snippet - by TeetharKehar - 03-17-2023, 04:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB