From 5f148baad58f5bf9ac7113211e526f9ffb0d18b9 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Tue, 13 Sep 2022 10:29:39 +0200 Subject: [PATCH] effacement d'un robot.txt inexistant --- core/core.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/core.php b/core/core.php index bf993cb5..955773e0 100644 --- a/core/core.php +++ b/core/core.php @@ -900,7 +900,9 @@ class common { // Update robots.txt file in output directory if ($this->getData(['config','seo', 'robots']) === true) { - unlink('robots.txt'); + if (file_exists('robots.txt')) { + unlink('robots.txt'); + } $sitemap->updateRobots(); } else { file_put_contents('robots.txt','User-agent: *' . PHP_EOL . 'Disallow: /');