Skip to content

Commit

Permalink
Merge pull request #82 from donatj/fix/motorola_edge
Browse files Browse the repository at this point in the history
Make Edge case sensitive
  • Loading branch information
donatj committed Jun 8, 2022
2 parents c84fd3c + 54b7aec commit 264cf23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/UserAgentParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function parse_user_agent( $u_agent = null ) {

preg_match_all(<<<'REGEX'
%(?P<browser>Camino|Kindle(\ Fire)?|Firefox|Iceweasel|IceCat|Safari|MSIE|Trident|AppleWebKit|
TizenBrowser|(?:Headless)?Chrome|YaBrowser|Vivaldi|IEMobile|Opera|OPR|Silk|Midori|Edge|EdgA?|CriOS|UCBrowser|Puffin|
TizenBrowser|(?:Headless)?Chrome|YaBrowser|Vivaldi|IEMobile|Opera|OPR|Silk|Midori|(?-i:Edge)|EdgA?|CriOS|UCBrowser|Puffin|
OculusBrowser|SamsungBrowser|SailfishBrowser|XiaoMi/MiuiBrowser|
Baiduspider|Applebot|Facebot|Googlebot|YandexBot|bingbot|Lynx|Version|Wget|curl|
Valve\ Steam\ Tenfoot|
Expand Down
5 changes: 5 additions & 0 deletions tests/user_agents.dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,11 @@
"browser": "Chrome",
"version": "18.0.1025.308"
},
"Mozilla\/5.0 (Linux; Android 11; motorola edge 20 lite) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/102.0.5005.78 Mobile Safari\/537.36": {
"platform": "Android",
"browser": "Chrome",
"version": "102.0.5005.78"
},
"Mozilla\/5.0 (Windows Mobile 10; Android 10.0; Microsoft; Lumia 950XL) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/100.0.4896.127 Mobile Safari\/537.36 Edge\/40.15254.603": {
"platform": "Android",
"browser": "Edge",
Expand Down

0 comments on commit 264cf23

Please sign in to comment.