serbanghita / Mobile-Detect

Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
http://mobiledetect.net
MIT License
10.52k stars 2.67k forks source link

False positive because of "sony" in UA #130

Closed vlakoff closed 11 years ago

vlakoff commented 11 years ago

One of the tests added in bfc1765226ea2d3ecca1e40b21a72ed01d49b66e fails:

'Opera/9.80 (Linux armv7l; HbbTV/1.1.1 (; Sony; KDL32W650A; PKG3.211EUA; 2013;); ) Presto/2.12.362 Version/12.11' => array('isMobile' => false, 'isTablet' => false),

Wrongly detected as mobile device. This is because of the sony, here:

protected $phoneDevices = array(
    // ...
    'Sony'          => 'sony|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i',
    // ...
);

I suppose matching "sony" is a bit too wide, after all they don't produce only mobiles.

This sony has been added in 8464001578d219f080b7d04ba84006c45f532f6c. That's why I open this issue, serbanghita do you remember why you added it?

serbanghita commented 11 years ago

@vlakoff it was just for 'catch all' purpose. I have to weight this, if I drop sony out of there I have to research at least the Sony smartphones signatures, to be able to keep isSony meaningful.

serbanghita commented 11 years ago

Done in 2.6.4