Install Joomla! 3.8.8 with some sample data
Enable plugin "System - Language Filter"
Set error reporting to maximum
No undefined index notice when we have bad or malformed user agent.
undefined index notice
Web Server Apache
PHP Version 7.0.27-0+deb9u1
Database Version 5.5.5-10.1.26-MariaDB-0+deb9u1
When I request home page with the following user agent "Mozilla/5.0 (Windows NT 5.1; U; de) Opera 8.50"
I get the error (in php errors log file)
PHP Notice: Undefined offset: 1 in /home/joomla_root/libraries/vendor/joomla/application/src/Web/WebClient.php on line 424
The same notice can happen with other (fake or old) user agents, see the code above in mentioned source file.
command to check
wget -U "Mozilla/5.0 (Windows NT 5.1; U; de) Opera 8.50" http://my.site/
Status | New | ⇒ | Confirmed |
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-05-28 15:37:44 |
Closed_By | ⇒ | mbabker |
Confirmed. Looking at http://www.useragentstring.com/pages/useragentstring.php?all=TRUE&name=Opera&vers=8.50 our library only supports parsing the
Opera/8.50
prefixed UA strings, we don't support the UA strings with theMozilla/
prefix.