|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-07-02 21:11 UTC] php7testing at prodpartners dot com
Description: ------------ get browser issues a warning on 7.0 alpha 2 when user-agent string is null - works fine on 5.6.8. get_browser works with user-agent string of $_SERVER['HTTP_USER_AGENT'] Warning: get_browser(): HTTP_USER_AGENT variable is not set, cannot determine user agent name in /usr/local/apache2/htdocs/php7testing/browscap_test.php on line 2 Test script: --------------- <?php $browser=get_browser(NULL, true); print_r($browser); ?> Patchesbug69983.phpt (last revision 2015-07-03 18:42 UTC by cmb@php.net)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 12:00:01 2025 UTC |
There seems to be a logic error in the detection of the user agent[1]. zend_is_auto_global_str(ZEND_STRL("_SERVER"))) yields 1, and so the error is triggered. Is it supposed to be !zend_is_auto_global_str(ZEND_STRL("_SERVER")))? @laruence: Can you please have a look at the issue? [1] <http://lxr.php.net/xref/PHP_TRUNK/ext/standard/browscap.c#465>