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) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-01-11 09:14:09 +01:00
parent 4e402b6378
commit f2c3b3f165

View File

@@ -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');