Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Other' is not returned anymore after updating #68

Open
csmeets opened this issue Jan 27, 2021 · 0 comments
Open

'Other' is not returned anymore after updating #68

csmeets opened this issue Jan 27, 2021 · 0 comments

Comments

@csmeets
Copy link

csmeets commented Jan 27, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant