The warnings... "Warning: Cannot modify header information - headers already sent" are simply because of the first message that is output, "Notice: Undefined offset: 1 in ...". Fix the 'Notice' and you fix the 'Warnings'.
Notice: Undefined offset: 1 in (site root) /scripts/checkuserlog.php on line 77
This is because you are trying to access the array element with index 1, but it has not yet been set - it is undefined. Note that is not a "Warning" or an "Error", it is
just a "Notice", but highlights a potential problem with the code. PHP will default this value, so your script probably works OK.
The following code will produce the same 'notice':
$myArray = array ();
$myArray[] = 'Hello'; // Index/Offset 0
echo $myArray[1]; // Notice: Undefined offset: 1
You can suppress "Notice" messages from being output in the first place by lowering the error_reporting() level:
error_reporting(E_ALL & ~E_NOTICE);
But this is generally a bad idea whilst developing.
It is possible that this is how the code was originally written (or is this your code?), to take into account PHP's default behaviour, but this is usually best avoided....
$myArray = array();
$myArray[] = 'Hello';
if (isset($myArray[1])) {
echo $myArray[1];
} else {
echo 'Not Set Yet!';// This gets output
}
Why should this only affect certain browsers?! The user logging script would seem to be checking certain browser characteristics so there could certainly be differences, but apart from that it's hard to say.