When checking the USER_AGENT, stripos must be used with a strict comparaison in case User agent start with the search word for example :
case (stripos($user_agent, 'blackberry') !== FALSE);
Who doesn't match this user agent : BlackBerry9530/4.7.0.167 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/102 UP.Link/6.3.1.20.0
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1948082.patch | 2.4 KB | jducro |
Comments
Comment #1
jducro commentedHere's a patch fixing it
Comment #2
jducro commentedComment #3
xen commentedThis made device detection fail on a site where we have Varnish rewrite the user-agent down to a simple set ("iPhone", "Mozilla", etc.) to improve caching opportunities. This patch fixes the problem.