-
Notifications
You must be signed in to change notification settings - Fork 495
Closed
Description
I think there's an issue with the following if
statement found in /DeviceDetector.php
:
The comment says that any device with the Touch
fragment running Windows 8 or later should be detected as a tablet:
/**
* According to http://msdn.microsoft.com/en-us/library/ie/hh920767(v=vs.85).aspx
* Internet Explorer 10 introduces the "Touch" UA string token. If this token is present at the end of the
* UA string, the computer has touch capability, and is running Windows 8 (or later).
* This UA string will be transmitted on a touch-enabled system running Windows 8 (RT)
*
* As most touch enabled devices are tablets and only a smaller part are desktops/notebooks we assume that
* all Windows 8 touch devices are tablets.
*/
if (is_null($this->device) && ($osShortName == 'WRT' || ($osShortName == 'WIN' && version_compare($osVersion, '8.0'))) && $this->isTouchEnabled()) {
$this->device = DeviceParserAbstract::DEVICE_TYPE_TABLET;
}
Executing version_compare('8.0', '8.0')
returns 0, which is falsy. So in the end the if statement will only be true when the $osVersion
is 8.1
or greater.
Am I missing something?
Metadata
Metadata
Assignees
Labels
No labels