From 6ecb5e9068b890e92946254e284d2defaef7acfe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 21 Nov 2009 17:15:13 +0000 Subject: [PATCH] Fix empty delimiter in isSpider() --- inc/functions.php | 3 +++ 1 file changed, 3 insertions(+) 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)); } -- 2.39.5