From efa85597c946d3d55ebc004b025b16792310684a Mon Sep 17 00:00:00 2001 From: Maciej Schmidt Date: Sun, 23 Aug 2015 04:38:20 +0200 Subject: [PATCH] Code cleanup --- src/Detector/CrawlerDetector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Detector/CrawlerDetector.php b/src/Detector/CrawlerDetector.php index bec9164..657695c 100644 --- a/src/Detector/CrawlerDetector.php +++ b/src/Detector/CrawlerDetector.php @@ -21,7 +21,7 @@ public function isCrawler($user_agent) $list = array_merge(require __DIR__ . '/Fixtures/CrawlersList.php'); foreach ($list as $crawler_name => $crawler_regex) { - if (preg_match('/(?:^|[^A-Z0-9\_\-])(?:' . str_replace('/', '\/', $crawler_regex) . ')/i', $user_agent, $matches)) { + if (preg_match('/(?:^|[^A-Z0-9\_\-])(?:' . str_replace('/', '\/', $crawler_regex) . ')/i', $user_agent)) { $this->name = trim($crawler_name); return true;