Skip to content

Commit f1063bd

Browse files
committed
Merge pull request #15 from woothee/fix_msie11
Fix MSIE11 and prepare v1.0.1 Close #14
2 parents 11bf04d + eb72cee commit f1063bd

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Install this library using [Composer](https://getcomposer.org/).
1616
Run below command in your project directory.
1717

1818
```
19-
$ composer require 'woothee/woothee:*'
19+
$ composer require woothee/woothee
2020
```
2121

2222
Or add this library in your `composer.json`'s `require` section manually.

src/AgentCategory/Browser/Msie.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public static function challenge($ua, &$result)
1313

1414
if (preg_match('/MSIE ([.0-9]+);/', $ua, $matches) === 1) {
1515
$version = $matches[1];
16-
} elseif (preg_match('/Trident\/([.0-9]+);(?: BOIE[0-9]+;[A-Z]+;)? rv:([.0-9]+)/', $ua, $matches) === 1) {
17-
$version = $matches[2];
16+
} elseif (preg_match('/Trident\/([.0-9]+);/', $ua) === 1 && preg_match('/rv:([.0-9]+)/', $ua, $matches) === 1) {
17+
$version = $matches[1];
1818
} elseif (preg_match('/IEMobile\/([.0-9]+);/', $ua, $matches) === 1) {
1919
$version = $matches[1];
2020
}

src/Classifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
class Classifier
3333
{
34-
const VERSION = '1.0.0';
34+
const VERSION = '1.0.1';
3535

3636
public function isCrawler($ua)
3737
{

woothee

0 commit comments

Comments
 (0)