You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2018. It is now read-only.
We just started feeding live data through the UAParser and it's working quite well for us. The only issue we have had thus far comes from Symbian related devices (Nokia):
This user agent string, for example:
Mozilla/5.0 (SymbianOS/9.1; U; en) AppleWebKit/413 (KHTML, like Gecko) Safari/413
Fails in UAParser.php with an "Undefined offset" error:
PHP Notice: Undefined offset: 1 in .../ua_parser/php/UAParser.php on line 307
Which think is happening because in the YAML there is this defined regex block:
- regex: 'Symbian'
device_replacement: 'Nokia'
If you change to the following, it seems to work:
- regex: '(Symbian)'
device_replacement: 'Nokia'
In other words that one wasn't defining a closure, so there would never be $matches[1] defined. Now, I don't know as much about user agents as you guys so is this a proper change, or should it perhaps be done another way?
Cheers,
Mike
The text was updated successfully, but these errors were encountered:
Rather than fix regexes.yaml I ended up fixing my PHP lib instead. This way if I forgot parens in the future it won't break again. Thanks much for letting us know about the issue and providing good details.
Hey guys,
We just started feeding live data through the UAParser and it's working quite well for us. The only issue we have had thus far comes from Symbian related devices (Nokia):
This user agent string, for example:
Mozilla/5.0 (SymbianOS/9.1; U; en) AppleWebKit/413 (KHTML, like Gecko) Safari/413
Fails in UAParser.php with an "Undefined offset" error:
PHP Notice: Undefined offset: 1 in .../ua_parser/php/UAParser.php on line 307
Which think is happening because in the
YAML
there is this defined regex block:If you change to the following, it seems to work:
In other words that one wasn't defining a closure, so there would never be
$matches[1]
defined. Now, I don't know as much about user agents as you guys so is this a proper change, or should it perhaps be done another way?Cheers,
Mike
The text was updated successfully, but these errors were encountered: