Skip to content
Snippets Groups Projects
Commit 0ca2eb37 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

check if statistics file and dir exists

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1059 44740490-163a-0410-bde0-09ae8108e29a
parent 1b2b6a66
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,13 @@ $statdir = $statconfig->getValue('statdir'); ...@@ -7,6 +7,13 @@ $statdir = $statconfig->getValue('statdir');
$inputfile = $statconfig->getValue('inputfile'); $inputfile = $statconfig->getValue('inputfile');
$statrules = $statconfig->getValue('statrules'); $statrules = $statconfig->getValue('statrules');
if (!is_dir($statdir))
throw new Exception('Statistics module: output dir do not exists [' . $statdir . ']');
if (!file_exists($inputfile))
throw new Exception('Statistics module: input file do not exists [' . $inputfile . ']');
$file = fopen($inputfile, 'r'); $file = fopen($inputfile, 'r');
$logfile = file($inputfile, FILE_IGNORE_NEW_LINES ); $logfile = file($inputfile, FILE_IGNORE_NEW_LINES );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment