tags:

views:

173

answers:

1

I'm 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,"[email protected]","From: [email protected]");
    die();
}
//set error handler

set_error_handler("customError");

Can anyone help point out what's causing the error?

+1  A: 

Ok I'm sorry I misunderstood your question.

Extend your customError() function to take also $errFile and $errLine, so you'll be able to see where the error actually happens.

Here is the documentation http://en.php.net/manual/en/function.set-error-handler.php

MartinodF
thanx MartinodF...atleast you have helped me out......I have got the error line and got my problem as well.....my file is running fine now.....Thanks a tonn man........
developer
you're welcome :)
MartinodF