From b86c943237e8b537a6de3f92e58e1b5494544a52 Mon Sep 17 00:00:00 2001
From: "p.durtsev"
Date: Mon, 13 May 2024 10:11:59 +0300
Subject: [PATCH] code review
---
lib/Mobile_Detect.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;