Skip to content

Commit

Permalink
trim() never returns false
Browse files Browse the repository at this point in the history
  • Loading branch information
JayBizzle committed Apr 25, 2016
1 parent 763ee31 commit 023ad63
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 @@ -168,7 +168,7 @@ public function isCrawler($userAgent = null)

$agent = preg_replace('/'.$this->getExclusions().'/i', '', $agent);

if (trim($agent) === false) {
if (strlen(trim($agent)) == 0) {
return false;
} else {
$result = preg_match('/'.$this->getRegex().'/i', trim($agent), $matches);
Expand Down

0 comments on commit 023ad63

Please sign in to comment.