I’m looping through my database records, thousands of records. I’m calling a number of methods which return calculations etc. I then do conditional statements based on these.
Any who, from the several thousand records I’m getting about 100 rows of this error which is from within one of the methods used.
Notice: Trying to access array offset on value of type null in
The line number comes from within my try statement.
I’ve tested the code on loads of random rows and it works so there’s just a few failing for an unknown reason.
I need to isolate these. I tried the try catch block but it doesn’t work. Any ideas for how I can catch the exact rows?
“`
try{
// do my checks
} catch (exception $e){
error_log($rowID. ‘ : ‘ . $e);
}