PHP 4.0 Bug #6513: get_browser() and $HTTP_USER_AGENT
| From: | stud1174 at di dot uoa dot gr | Date: | Sun, 03 Sep 2000 13:20:11 +0000 |
| Subject: | PHP 4.0 Bug #6513: get_browser() and $HTTP_USER_AGENT | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-31800@lists.php.net to get a copy of this message | ||
From: stud1174@di.uoa.gr
Operating system: NT4 Server SP6a
PHP version: 4.0.2
PHP Bug Type: Feature/Change Request
Bug description: get_browser() and $HTTP_USER_AGENT
I have a remark about the get_browser() function. When this function is called without arguments it
is supposed to use $HTTP_USER_AGENT for argument. However if I use the
configuration directive
register_globals = Off
then the variable $HTTP_USER_AGENT is not defined and get_browser() returns an error. In this case I
have to do the following
$HTTP_USER_AGENT = getenv("HTTP_USER_AGENT");
$browser = get_browser();
or alternatively
$a = getenv("HTTP_USER_AGENT");
$browser = get_browser($a);
I suggest that get_browser() function should act more cleverly in this case and use getenv() to get
the HTTP_USER_AGENT.