Issues

ZF-11541: PHP error notices raised in Zend_Http_UserAgent class and subclasses

Description

The code is not handling non existing array keys which is causing many PHP notices to be logged.

Comments

Can you provide some exemplar output displaying the notices? This will help us identify where in the code-base we need to add checks.

this was in deed very bad problem description, shame on me

my environment: * Zend from tag release-1.11.7 * detecting mobile devices with WURFL * testing with XPERIA Mini

PHP log messages:

PHP Notice: Undefined offset: 1 in Zend/Http/UserAgent/AbstractDevice.php on line 558 PHP Notice: Undefined offset: 1 in Zend/Http/UserAgent/AbstractDevice.php on line 573 PHP Notice: Undefined offset: 1 in Zend/Http/UserAgent/AbstractDevice.php on line 585 PHP Notice: Undefined offset: 1 in Zend/Http/UserAgent/AbstractDevice.php on line 586

It is only PHP Notice of course. The whole extractFromUserAgent() is written in a way that it may raise many more notices.

What about filling in $results with some defaults in begin of the method ?

Can you check against the code in current trunk? I think this may be resolved already via ZF-11557.

yes, seams to be fixed. thank you

Fixed with issue ZF-11557.