From:             prakash dot ved dot v at gmail dot com
Operating system: Linux, Windows
PHP version:      5.2.9
PHP Bug Type:     *General Issues
Bug description:  get_browser incorrectly matches browscap.ini

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
)

-- 
Edit bug report at http://bugs.php.net/?id=47725&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=47725&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=47725&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=47725&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=47725&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47725&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=47725&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=47725&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=47725&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=47725&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=47725&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=47725&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=47725&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=47725&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=47725&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47725&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47725&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=47725&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=47725&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=47725&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=47725&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=47725&r=mysqlcfg

Reply via email to