get_browser() needs to use zend_is_auto_global() on _SERVER.

This commit is contained in:
Jay Smith 2003-03-18 21:49:01 +00:00
parent 3e621fac94
commit c0d1508ec8

View File

@ -244,6 +244,7 @@ PHP_FUNCTION(get_browser)
}
if (agent_name == NULL || Z_TYPE_PP(agent_name) == IS_NULL) {
zend_is_auto_global("_SERVER", sizeof("_SERVER")-1 TSRMLS_CC);
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) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "HTTP_USER_AGENT variable is not set, cannot determine user agent name");