mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
get_browser() needs to use zend_is_auto_global() on _SERVER.
This commit is contained in:
parent
3e621fac94
commit
c0d1508ec8
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user