FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=15764&edit=1

ID: 15764
Updated by: jason@rustyparts.com
Reported By: stephane at ovensia dot fr
Summary: Undefined offset in
Net_UserAgent_Detect::getBrowserString()
-Status: Feedback
+Status: Closed
Type: Bug
Package: Net_UserAgent_Detect
Operating System: GNU Linux / Debian Etch
Package Version: 2.5.0
PHP Version: 5.2.0
-Assigned To:
+Assigned To: jrust
Roadmap Versions:
New Comment:

-Status: Feedback
+Status: Closed
-Assigned To:
+Assigned To: jrust
Looks to be a duplicate of #16935 which is fixed.


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

[2009-06-09 06:13:17] doconnor

-Status: Open
+Status: Feedback
Thank you for taking the time to report a problem with the package.
Unfortunately you are not using a current version of the package --
the problem might already be fixed. Please download a new
version from http://pear.php.net/packages.php

If you are able to reproduce the bug with one of the latest
versions, please change the package version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PEAR.

Works for me, 2.5.1

<? require_once 'Net/UserAgent/Detect.php'; $_SERVER['HTTP_USER_AGENT']
= 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; fr-fr)
AppleWebKit/525.27.1 (KHTML, like Gecko)'; echo
Net_UserAgent_Detect::getBrowserString(); ?>

Mozilla/Netscape 6.x (wrong browser string, but no e_notice)

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

[2009-01-25 07:20:31] ovensia

Description:
------------
My bug catcher send me this error with a visitor who had the User Agent
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; fr-fr)
AppleWebKit/525.27.1 (KHTML, like Gecko)"

Test script:
---------------
<?
require_once 'Net/UserAgent/Detect.php';

$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS
X 10_5_6; fr-fr) AppleWebKit/525.27.1 (KHTML, like Gecko)';

echo Net_UserAgent_Detect::getBrowserString();
?>

Expected result:
----------------
Expected : real browser string

Actual result:
--------------
Notice: Undefined offset: 1 in /usr/share/php/Net/UserAgent/Detect.php
on line 413

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedApr 15, '10 at 5:54p
activeApr 15, '10 at 5:54p
posts1
users1
websitepear.php.net

1 user in discussion

Jason: 1 post

People

Translate

site design / logo © 2022 Grokbase