reference). (Bob)
- Standard:
+ . Fixed bug #69983 (get_browser fails with user agent of null).
+ (Kalle, cmb, Laruence)
. Fixed bug #69976 (Unable to parse "all" urls with colon char). (cmb)
. Fixed bug #69768 (escapeshell*() doesn't cater to !). (cmb)
}
if (agent_name == NULL) {
- if ((Z_TYPE(PG(http_globals)[TRACK_VARS_SERVER]) == IS_ARRAY || zend_is_auto_global_str(ZEND_STRL("_SERVER"))) ||
+ if ((Z_TYPE(PG(http_globals)[TRACK_VARS_SERVER]) == IS_ARRAY || zend_is_auto_global_str(ZEND_STRL("_SERVER"))) &&
(http_user_agent = zend_hash_str_find(Z_ARRVAL_P(&PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_USER_AGENT", sizeof("HTTP_USER_AGENT")-1)) == NULL
) {
php_error_docref(NULL, E_WARNING, "HTTP_USER_AGENT variable is not set, cannot determine user agent name");
--- /dev/null
+--TEST--
+Bug #69983 (get_browser fails with user agent of null)
+--INI--
+browscap={PWD}/browscap.ini
+--ENV--
+HTTP_USER_AGENT="Opera/7.11 (Windows NT 5.1; U) [en]"
+--FILE--
+<?php
+$browser=get_browser(NULL, true);
+print_r($browser);
+?>
+--EXPECT--
+Array
+(
+ [browser_name_regex] => ~^.*$~
+ [browser_name_pattern] => *
+ [browser] => Default Browser
+ [version] => 0
+ [majorver] => 0
+ [minorver] => 0
+ [platform] => unknown
+ [alpha] =>
+ [beta] =>
+ [win16] =>
+ [win32] =>
+ [win64] =>
+ [frames] => 1
+ [iframes] =>
+ [tables] => 1
+ [cookies] =>
+ [backgroundsounds] =>
+ [authenticodeupdate] => 0
+ [cdf] =>
+ [vbscript] =>
+ [javaapplets] =>
+ [javascript] =>
+ [activexcontrols] =>
+ [stripper] =>
+ [isbanned] =>
+ [wap] =>
+ [ismobiledevice] =>
+ [issyndicationreader] =>
+ [crawler] =>
+ [css] => 0
+ [cssversion] => 0
+ [supportscss] =>
+ [aol] =>
+ [aolversion] => 0
+)