]> granicus.if.org Git - php/commitdiff
Make get_browser() read its information from $HTTP_SERVER_VARS[] if available
authorZeev Suraski <zeev@php.net>
Tue, 13 Mar 2001 23:20:23 +0000 (23:20 +0000)
committerZeev Suraski <zeev@php.net>
Tue, 13 Mar 2001 23:20:23 +0000 (23:20 +0000)
NEWS
ext/standard/browscap.c

diff --git a/NEWS b/NEWS
index e8109c206b8eb21090facfbcd688973f64eea7b1..852e51907dd6c4a2f43632dba1639fa2bdc2aaa4 100644 (file)
--- 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)
index 61f46ed32733953ddf5e2879b4f0e251da01a4fa..add8586f4dab8a46ee81eb1012a3284b9fae8210 100644 (file)
@@ -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;
                        }