uap-php icon indicating copy to clipboard operation
uap-php copied to clipboard

'Other' is not returned anymore after updating

Open ghost opened this issue 4 years ago • 0 comments

Hi,

We went from "ua-parser/uap-php": "^3.8, < 3.9" to: "ua-parser/uap-php": "^3.9",

With version 3.8 i had this check in our code

$parser = Parser::create();              
$result = $parser->parse($request->headers->get('User-Agent'));

return 1 == $request->request->get('mobile-view') || 'Other' !== $result->device->family;

With this version i could check for 'Other' in order to check if the user is working on a desktop or mobile

When i update to 3.9 the $result->device->family returns 'MAC' instead of other (in my case i am working on a mac)

That means that for every operating system it will return something else.

Is there something else i can check in order to check if the user is on mobile or on desktop?

ghost avatar Jan 27 '21 13:01 ghost