Hello !! I have a problem with error_logs. The problem is in this
code:
$id_tmp = $_REQUEST["id"];
if(!isset($id_t mp) && empty($id_tmp)) {
invalidArgs();
echo "buug";
}
I'd like to check if the variable id is passed by GET method to the
script. If not, function invalidArgs() will start.
In function invalidArgs() I thrown exception InvalidArgsExce ption. I
set a handler for whole script to manage exceptions using
set_exception_h andler(); function. I write, by error_log, errors to
file and show warning page that the parameter id isn't pass through.
And the problem is that when I open this page in www browser IE6 and
put correct parameter id everything is ok, the page that suppose to is
showing but in file where errors are written (by error_logs), are
appeared errors of InvalidArgsExce ption ?? That's really weird
because the script doesn't suppose to get into if-block and start
function invalidArgs(). What is wrong, why error_log writes an errors
that doesn't suppose to ?? Everything work correct, the page and the
rest of the script acts like it gets the id parameter from GET
methods, but there is entry in error_log file ??
code:
$id_tmp = $_REQUEST["id"];
if(!isset($id_t mp) && empty($id_tmp)) {
invalidArgs();
echo "buug";
}
I'd like to check if the variable id is passed by GET method to the
script. If not, function invalidArgs() will start.
In function invalidArgs() I thrown exception InvalidArgsExce ption. I
set a handler for whole script to manage exceptions using
set_exception_h andler(); function. I write, by error_log, errors to
file and show warning page that the parameter id isn't pass through.
And the problem is that when I open this page in www browser IE6 and
put correct parameter id everything is ok, the page that suppose to is
showing but in file where errors are written (by error_logs), are
appeared errors of InvalidArgsExce ption ?? That's really weird
because the script doesn't suppose to get into if-block and start
function invalidArgs(). What is wrong, why error_log writes an errors
that doesn't suppose to ?? Everything work correct, the page and the
rest of the script acts like it gets the id parameter from GET
methods, but there is entry in error_log file ??
Comment