Undefined offset: 1
I am getting this error related to my PHP error handling function.
Undefined offset: 1
Here's the error handling code:
function customError($errno, $errstr)
{
error_log("Error: [$errno] $errstr",1,"ah@mysite.com","From: ah@mysite.com");
die();
}
//set error handler
set_error_handler("customError");
Can anyone point out what is causing the error?
-1
a source to share
1 answer
Okay, I'm sorry I didn't understand your question.
Extend customError () to take $ errFile and $ errLine as well, so you can see where the error occurs.
Here is the documentation http://en.php.net/manual/en/function.set-error-handler.php
+1
a source to share