From: Zeev Suraski Date: Tue, 13 Mar 2001 23:20:23 +0000 (+0000) Subject: Make get_browser() read its information from $HTTP_SERVER_VARS[] if available X-Git-Tag: php-4.0.6RC1~698 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b5a76864025dc3523dd200070786bc87e47ed69;p=php Make get_browser() read its information from $HTTP_SERVER_VARS[] if available --- diff --git a/NEWS b/NEWS index e8109c206b..852e51907d 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,10 @@ PHP 4.0 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| +?? ??? 200?, Version 4.0.6 +- Added mysql_unbuffered_query(), which is useful for very large result sets + (Zeev) + ?? ??? 200?, Version 4.0.5 - Added array_reduce(), which allows iterative reduction of an array to a single value via a callback function. (Andrei) diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index 61f46ed327..add8586f4d 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -203,7 +203,8 @@ PHP_FUNCTION(get_browser) switch(ZEND_NUM_ARGS()) { case 0: - if (zend_hash_find(&EG(symbol_table), "HTTP_USER_AGENT", sizeof("HTTP_USER_AGENT"), (void **) &agent_name)==FAILURE) { + if (!PG(http_globals)[TRACK_VARS_SERVER] + || zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]->value.ht, "HTTP_USER_AGENT", sizeof("HTTP_USER_AGENT"), (void **) &agent_name)==FAILURE) { zend_error(E_WARNING,"HTTP_USER_AGENT variable is not set, cannot determine user agent name"); RETURN_FALSE; }