Skip to content

Commit

Permalink
Regex doesn’t need to be case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
donatj committed Mar 8, 2019
1 parent 209ba8c commit 5f2da26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/UserAgentParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function parse_user_agent( $u_agent = null ) {

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

$platform = 'PlayStation ' . preg_replace('/\D/', '', $pKey);
Expand Down

0 comments on commit 5f2da26

Please sign in to comment.