Skip to content

Commit

Permalink
Fixed PHP 8.1 deprecation warning (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya authored Dec 7, 2021
1 parent 487b73e commit f9d63a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CrawlerDetect.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function isCrawler($userAgent = null)
$agent = trim(preg_replace(
"/{$this->compiledExclusions}/i",
'',
$userAgent ?: $this->userAgent
$userAgent ?: $this->userAgent ?: ''
));

if ($agent === '') {
Expand Down

0 comments on commit f9d63a3

Please sign in to comment.