From f2c3b3f165dd15d23be4f33038498e2db814316e Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Mon, 11 Jan 2016 09:14:09 +0100 Subject: [PATCH] ignore errors when deleting old statistics-index-page in case this is the first run and no index.html exists yet Signed-off-by: Michael Kaufmann (d00p) --- scripts/jobs/cron_traffic.inc.functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/jobs/cron_traffic.inc.functions.php b/scripts/jobs/cron_traffic.inc.functions.php index 908a9b74..126a7a4d 100644 --- a/scripts/jobs/cron_traffic.inc.functions.php +++ b/scripts/jobs/cron_traffic.inc.functions.php @@ -131,8 +131,8 @@ function awstatsGenerateIndex($domain, $outputdir) { // Write the index file { - // 'index.html' used to be a symlink - unlink(makeCorrectFile($outputdir . '/' . 'index.html')); + // 'index.html' used to be a symlink (ignore errors in case this is the first run and no index.html exists yet) + @unlink(makeCorrectFile($outputdir . '/' . 'index.html')); $awstats_index_file = fopen(makeCorrectFile($outputdir . '/' . 'index.html'), 'w'); $awstats_index_tpl = fopen($index_file, 'r');