Logging from a PHP Notice
Posted: Fri Jan 04, 2008 2:36 pm
Glad to see I can finally get my DNS to find the site! It's been hectic few days searching for help, so maybe someone here can shed some light on my problem.
I have some legacy code that is present on a live program.
The error I get is:
Now this is a DB query from a delimited list that is returned. How can I find out more information about this issue when the PHP Notice is thrown? I was thinking something similar to a try/catch to get the information, but wasn't sure. My initial idea was a function like if(PHP_NOTICE) or something like that to run something when the Notice is thrown.
What would be the best solution to find out what is actually being set in $retValues (only when the issue happens). I can't feasibly do it everytime because it is a live program now. It's not an issue the users themselves notice, but I would rather clean up the code to the best possible. I don't want any coding errors to be in the logs.
I have some legacy code that is present on a live program.
The error I get is:
by the line:[client x.x.x.x] PHP Notice: Undefined offset: 3 in /.../x.php on line 70
Code: Select all
list($a,$b,$c,$d) = split(":", $retValues);What would be the best solution to find out what is actually being set in $retValues (only when the issue happens). I can't feasibly do it everytime because it is a live program now. It's not an issue the users themselves notice, but I would rather clean up the code to the best possible. I don't want any coding errors to be in the logs.