ID:               21468
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         Unknown/Other Function
 Operating System: Various
 PHP Version:      4.3.0
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2003-01-06 12:50:01] [EMAIL PROTECTED]

I am the developer who maintains the browscap.ini file that is
recommended by PHP. Despite some recent bug fixes there still seems to
be at least one bug in the get_browser() function.

Simply put, multiple question marks surrounded by white space in a user
agent definition in browscap.ini creates some sort of error that
results in a valid user agent not being recognized by get_browser().

Here's a more detailed example of what I mean. 

user agent: Mozilla/4.8 [en] (Windows NT 5.0; U)
original browscap.ini definition: Mozilla/4.8 ???? (Windows NT 5.0; U)
updated browscap.ini definition: Mozilla/4.8*(Windows NT 5.0; U)

The original definition resulted in the user agent not being found and
the Default browser being returned. The updated definition works fine.
This forms the basis of my theory about multiple question marks
surrounded by white space. By the way, both definitions are valid and
both work just fine on other platforms such as ASP.

With the help of a fellow developer we did some further testing to
confirm my theory.

The following user agent definitions did not result in a match when
presented with a user agent that should have created a match:

Mozilla/4.76C-CCK-MCD  ???? (X11; ?; SunOS 5.? sun4u)
Mozilla/4.76C-CCK-MCD vg_472 ???? (X11; ?; SunOS 5.8 sun4u)
Mozilla/4.76C-SGI ???? (X11; ?; IRIX64 6.5 IP30)
Mozilla/4.79C-CCK-MCD  ???? (X11; ?; SunOS 5.6 sun4u)

But these did result in matches:

Mozilla/4.79 ????*(Win95; ?)
Mozilla/4.78 (Windows 2000; U) Opera 6.05  ????
Mozilla/5.0 (BeOS; ?; BeOS BePC; ?????; rv:1.0.?) Gecko/????????

This seems to suggest a problem only when multiple question marks are
surrounded on both sides by white space.

I hope this is enough information for someone to attempt a fix.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21468&edit=1

Reply via email to