Skip to content

Commit

Permalink
Improves version detection for Clecko engine (#7625)
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuconcioiu authored Mar 14, 2024
1 parent 0daaf74 commit cd0bbdb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Parser/Client/Browser/Engine/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public function parse(): ?array
return null;
}

if ('Gecko' === $this->engine) {
$pattern = '~[ ](?:rv[: ]([0-9\.]+)).*gecko/[0-9]{8,10}~i';
if ('Gecko' === $this->engine || 'Clecko' === $this->engine) {
$pattern = '~[ ](?:rv[: ]([0-9\.]+)).*(?:g|cl)ecko/[0-9]{8,10}~i';

if (\preg_match($pattern, $this->userAgent, $matches)) {
return ['version' => \array_pop($matches)];
Expand Down
2 changes: 1 addition & 1 deletion Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9003,7 +9003,7 @@
name: Classilla
version:
engine: Clecko
engine_version:
engine_version: 9.3.0
family: Firefox
-
user_agent: w3m/0.52
Expand Down

0 comments on commit cd0bbdb

Please # to comment.