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
Posted by Marcin Gil (mgil) on 2011-04-19T15:12:58.000+0000
How can I attach a patch (diff file)?
Posted by Matthew Weier O'Phinney (matthew) on 2011-04-19T15:55:05.000+0000
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).
Posted by Maksym Sliesarenko (sm) on 2011-04-20T08:30:52.000+0000
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}
Posted by Maksym Sliesarenko (sm) on 2011-04-20T08:37:00.000+0000
Parser misunderstood prev comment :)
replace code on line 651:
with:
Posted by Adam Lundrigan (adamlundrigan) on 2011-04-29T18:27:54.000+0000
Fixed in trunk r23892
Posted by Satoru Yoshida (satoruyoshida) on 2011-05-03T10:12:46.000+0000
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.
Posted by Ralph Schindler (ralph) on 2011-05-03T14:59:05.000+0000
Fixed in release 1.11 branch at r23956