Skip to content

Commit

Permalink
Merge pull request #48 from tell-k/master
Browse files Browse the repository at this point in the history
Catch up with woothee v1.10.0
  • Loading branch information
okonomi authored May 20, 2019
2 parents cb72f71 + 2c1349f commit 7f3665c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/AgentCategory/Browser/SafariChrome.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ public static function challenge($ua, &$result)

$version = DataSet::VALUE_UNKNOWN;

$epos = strpos($ua, 'Edge');
$epos = strpos($ua, 'Edg');

if ($epos > -1) {
if (preg_match('#Edge/([.0-9]+)#', $ua, $matches)) {
if (preg_match('/(?:Edge|Edg|EdgiOS|EdgA)\/([.0-9]+)/', $ua, $matches)) {
$version = $matches[1];

static::updateMap($result, DataSet::get('Edge'));
Expand Down
3 changes: 2 additions & 1 deletion src/AgentCategory/Os/Linux.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public static function challenge($ua, &$result)

if (strpos($ua, 'Android') !== false) {
$data = DataSet::get('Android');
if (preg_match('/Android[- ](\\d+\\.\\d+(?:\\.\\d+)?)/', $ua, $matches)) {

if (preg_match('/Android[- ](\\d+(?:\\.\\d+(?:\\.\\d+)?)?)/', $ua, $matches)) {
$version = $matches[1];
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Classifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

class Classifier
{
const VERSION = '1.8.0';
const VERSION = '1.10.0';

public function isCrawler($ua)
{
Expand Down
2 changes: 1 addition & 1 deletion woothee

0 comments on commit 7f3665c

Please sign in to comment.