#6513 [Opn]: get_browser() and register_globals
| From: | philip@php.net | Date: | Mon, 30 Dec 2002 05:07:35 +0000 |
| Subject: | #6513 [Opn]: get_browser() and register_globals | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969350486@lists.php.net to get a copy of this message | ||
ID: 6513
Updated by: philip@php.net
Reported By: stud1174@di.uoa.gr
Status: Open
Bug Type: Documentation problem
Operating System: all
PHP Version: 4.3.0-RC2
New Comment:
I'm leaving this open until someone can test with an older version, I
don't feel like it right now :) But, the docs are now register_globals
= off friendly.
Previous Comments:
------------------------------------------------------------------------
[2002-12-04 10:31:49] philip@php.net
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
------------------------------------------------------------------------
[2000-09-03 09:20:11] stud1174@di.uoa.gr
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