ID: 6513
Updated by: [EMAIL PROTECTED]
-Summary: get_browser() and $HTTP_USER_AGENT
Reported By: [EMAIL PROTECTED]
Status: Open
-Bug Type: Feature/Change Request
+Bug Type: Documentation problem
-Operating System: NT4 Server SP6a
+Operating System: all
-PHP Version: 4.0.2
+PHP Version: 4.3.0-RC2
New Comment:
This is a doc problem, not a feature request. Not sure when this
behavior changed but I just tested and register_globals does not affect
get_browser() in PHP 4.3.0 but a user comment suggests this problem
existed as of 10-Jan-2002 so it needs to be researched.
a) When was this fixed? Document what it means.
b) Remove the $, and refer to $_SERVER in docs
c) If it turns out this wasn't fixed, reopen as a bug
Previous Comments:
------------------------------------------------------------------------
[2000-09-03 09:20:11] [EMAIL PROTECTED]
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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=6513&edit=1
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php