From: Roland Häder Date: Sat, 21 Nov 2009 17:15:13 +0000 (+0000) Subject: Fix empty delimiter in isSpider() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6ecb5e9068b890e92946254e284d2defaef7acfe;p=mailer.git Fix empty delimiter in isSpider() --- diff --git a/inc/functions.php b/inc/functions.php index 8bb05f320e..6b7a1b6138 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -3846,6 +3846,9 @@ function encodeUrl ($url, $outputMode = '0') { // Simple check for spider function isSpider () { + // It should not be empty, if so it is better a spider/bot + if (detectUserAgent(true) == '') return true; + // Is it a spider? return ((strpos('spider', strtolower(detectUserAgent(true))) !== false) || (strpos('bot', strtolower(detectUserAgent(true))) !== false)); }