jenssegers / jenssegers/agent

Platform returns false for iOS user agent

Open
#159 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
4.9k
Forks
545
PR merge metrics
No merged PRs in 30d

Description

Received the following user agent in a request: `MyAirtel/4.6.38 (iPhone; iOS 13.1.2; Scale/3.00)`

Appears to be iPhone, but `->platform` returns simply `false`.

```
>>> use Jenssegers\Agent\Agent;
>>> $agent = new Agent();
=> Jenssegers\Agent\Agent {#2215}
>>> $agent->setUserAgent('MyAirtel/4.6.38 (iPhone; iOS 13.1.2; Scale/3.00)');
=> "MyAirtel/4.6.38 (iPhone; iOS 13.1.2; Scale/3.00)"
>>> $agent->platform();
=> false
```

Is this a known issue? Is it fixable?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the Agent::platform() entry point and reproduce the reported MyAirtel iPhone user agent. Trace how this user-agent string is classified and compare it with other iOS examples; the work is done when the platform is identified instead of returning false and the behavior is covered by a regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.