ZF-11274: Zend_Http_UserAgent_AbstractDevice raises a notice

Description

Zend_Http_UserAgent_AbstractDevice::extractFromUserAgent() raises a notice on given user agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0

Bug is in line 651. $comment[3] is not an existing element in $comment array.

Comments

How can I attach a patch (diff file)?

Click "More Actions" and select the "Attach Files" option. If it's not present, that means we need a CLA from you (http://framework.zend.com/cla).

replace code on line 651: {quote} $result['browser_language'] = trim($comment[3]); {quote}

with:

{quote} if (isset($comment[3])) { $result['browser_language'] = trim($comment[3]); } {quote}

Parser misunderstood prev comment :)

replace code on line 651:


    $result['browser_language'] = trim($comment[3]);

with:


if (isset($comment[3])) {
    $result['browser_language'] = trim($comment[3]);
}

Fixed in trunk r23892

Hello, Adam. I will push [solve] button as proxy for You. If You want to release at next mini, You can merge this commit fron trunk to 1.11 branch.

Thanks.

Fixed in release 1.11 branch at r23956