Hi,
I have a script that grabs the page where a certain action happens. If the http_referer is empty, I get the notice in my log file:
PHP Notice: Undefined index: HTTP_REFERER for the first line of the code below.
$urlpx=parse_url(strtok($_SERVER["HTTP_REFERER"],'?'), PHP_URL_PATH);
if(empty($urlpx)) {
$urlp="NOREF";
}
else {
$urlp=$urlpx;
}
The rest after the first line is what I added in my attempt to make referer stop being undefined, but I still get the notices. I realized that the IF statement works fine, but notice is still there as there are no referers in some instances.
So, is it possible to prevent logging it from within the script? Something that would be added to the first line of the code?
Please note that I do want all logging to be ON as it is now.
Thank you