diff --git a/lib/Mobile_Detect.php b/lib/Mobile_Detect.php index 25d86ff..1bc61f7 100644 --- a/lib/Mobile_Detect.php +++ b/lib/Mobile_Detect.php @@ -1258,7 +1258,7 @@ public function match($regex, $userAgent = null) if (empty($userAgent)) { return false; } - $match = (bool) preg_match(sprintf('#%s#is', $regex), (false === empty($userAgent) ? $userAgent : $this->userAgent), $matches); + $match = (bool) preg_match(sprintf('#%s#is', $regex), $userAgent, $matches); // If positive match is found, store the results for debug. if ($match) { $this->matchingRegex = $regex;