|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-03-20 18:43 UTC] kalle@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Mar 28 18:00:01 2026 UTC |
Description: ------------ PHP get_browser function seems to not have proper pattern match for Sleipnir browser. passing the UA string to the function returns incorrect information. This happens across all the platforms and all the versions, this also includes 5.2.9-1. Reproduce code: --------------- <?php $browser = get_browser("Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727) Sleipnir/2.8.4",false); print_r($browser); ?> Expected result: ---------------- These are the expected values for the following object members [parent]=>Sleipnir 2.8.4 [version]=>2.8.4 [minorver]=>2 [browser]=>Sleipnir Actual result: -------------- stdClass Object ( [browser_name_regex] => ^mozilla/4\.0 (compatible; msie 7\.0; .*windows nt 5\.1.*).*$ [browser_name_pattern] => Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.1*)* [parent] => IE 7.0 [platform] => WinXP [browser] => IE [version] => 7.0 [majorver] => 7 [win32] => 1 [frames] => 1 [iframes] => 1 [tables] => 1 [cookies] => 1 [backgroundsounds] => 1 [cdf] => 1 [vbscript] => 1 [javaapplets] => 1 [javascript] => 1 [activexcontrols] => 1 [cssversion] => 2 [supportscss] => 1 [minorver] => 0 [alpha] => [beta] => [win16] => [win64] => [isbanned] => [ismobiledevice] => [issyndicationreader] => [crawler] => [aol] => [aolversion] => 0 )