From adafd145643f23ab5df1aa845b20310f9a7dadc6 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Thu, 13 May 2021 22:31:52 +0200 Subject: [PATCH] RobotsTxt : The Crawldelay must not be set to 3s if it doesn't exists in the content of the Robots file --- src/Robotstxt.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Robotstxt.php b/src/Robotstxt.php index ad697fe..5d03084 100644 --- a/src/Robotstxt.php +++ b/src/Robotstxt.php @@ -31,9 +31,9 @@ class Robotstxt */ private $sitemaps = array (); - /** The crawldelay defined in the file (3s if not defined) + /** The crawldelay defined in the file */ - private $crawldelay = 3; + private $crawldelay = null; /** The host can be specified as default website */ @@ -125,7 +125,7 @@ class Robotstxt elseif (stripos ($line, "crawl-delay:") === 0) { $val = $this->getValueFromLine ($line); - if ($val > 1 && $val < 60 && $this->crawldelay === 3) + if ($val > 1 && $val < 60 && $this->crawldelay === null) $this->crawldelay = intval ($val); else $this->errors[$i] = dgettext ("domframework",