From f9d63a3581428fd8a3858e161d072f0b9debc26f Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Tue, 7 Dec 2021 19:35:06 +0100 Subject: [PATCH] Fixed PHP 8.1 deprecation warning (#475) --- src/CrawlerDetect.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CrawlerDetect.php b/src/CrawlerDetect.php index 777bdc37..89287cba 100644 --- a/src/CrawlerDetect.php +++ b/src/CrawlerDetect.php @@ -165,7 +165,7 @@ public function isCrawler($userAgent = null) $agent = trim(preg_replace( "/{$this->compiledExclusions}/i", '', - $userAgent ?: $this->userAgent + $userAgent ?: $this->userAgent ?: '' )); if ($agent === '') {