Skip to content

Commit

Permalink
Use official browsername
Browse files Browse the repository at this point in the history
  • Loading branch information
810 committed May 8, 2019
1 parent 134f298 commit a2f21b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Tests/Web/WebClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public static function getUserAgentData()
'Mozilla/5.0 (compatible; Konqueror/4.4; Linux 2.6.32-22-generic; X11; en_US) KHTML/4.4.3 (like Gecko) Kubuntu'),
array('', false, WebClient::AMAYA, '', '', 'amaya/11.3.1 libwww/5.4.1'),
array(WebClient::WINDOWS, false, WebClient::PRESTO, WebClient::OPERA, '8.50', 'Mozilla/5.0 (Windows NT 5.1; U; de) Opera 8.50'),
array(WebClient::WINDOWS, false, WebClient::BLINK, WebClient::EDG, '75.0.107.0',
array(WebClient::WINDOWS, false, WebClient::BLINK, WebClient::CHROMIUMEDGE, '75.0.107.0',
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3738.0 Safari/537.36 Edg/75.0.107.0'),
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Web/WebClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class WebClient
const ANDROIDTABLET = 22;
const EDGE = 23;
const BLINK = 24;
const EDG = 25;
const CHROMIUMEDGE = 25;

/**
* @var integer The detected platform on which the web client runs.
Expand Down Expand Up @@ -283,7 +283,7 @@ protected function detectBrowser($userAgent)
}
elseif (stripos($userAgent, 'Edg') !== false)
{
$this->browser = self::EDG;
$this->browser = self::CHROMIUMEDGE;
$patternBrowser = 'Edg';
}
elseif ((stripos($userAgent, 'Firefox') !== false) && (stripos($userAgent, 'like Firefox') === false))
Expand Down

0 comments on commit a2f21b3

Please sign in to comment.