Skip to content

Commit

Permalink
Make webkit logic a little safer
Browse files Browse the repository at this point in the history
  • Loading branch information
donatj committed Aug 28, 2024
1 parent 9cd7ded commit b0ffbe4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/UserAgentParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,13 @@ function parse_user_agent( $u_agent = null ) {
$platform = 'BlackBerry';
} elseif( $platform == 'BlackBerry' || $platform == 'PlayBook' ) {
$browser = 'BlackBerry Browser';
} else {
$find('Safari', $key, $browser) || $find('TizenBrowser', $key, $browser);
} elseif( $find('Safari', $key, $browser) || $find('TizenBrowser', $key, $browser) ) {
$version = $result[BROWSER_VERSION][$key];
}

$find('Version', $key);
$version = $result[BROWSER_VERSION][$key];
if( $find('Version', $key) ) {
$version = $result[BROWSER_VERSION][$key];
}
} elseif( $pKey = preg_grep('/playstation \d/i', $result[BROWSER]) ) {
$pKey = reset($pKey);

Expand Down

0 comments on commit b0ffbe4

Please sign in to comment.