summaryrefslogtreecommitdiff
path: root/json.php
diff options
context:
space:
mode:
authorChristoph Brill <egore911@egore911.de>2012-02-02 13:37:44 +0100
committerChristoph Brill <egore911@egore911.de>2012-03-26 00:15:41 +0200
commitba86117ed744c59c87842b8fddf3a21f6d68640a (patch)
tree7112be9e85cb4db5053503464653a2301b3b8046 /json.php
parented248bdba09842d264eb940cbb1ffb659eedc351 (diff)
If the file does not exist don't try to parse it
Diffstat (limited to 'json.php')
-rw-r--r--json.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/json.php b/json.php
index f5db03c..3f71ec6 100644
--- a/json.php
+++ b/json.php
@@ -29,7 +29,11 @@ if (isset($_GET['users'])) {
$filename = 'dri-devel-'.$date.'.log';
-$lines = file(LOG_DIR.$filename);
+if (file_exists(LOG_DIR.$filename)) {
+ $lines = file(LOG_DIR.$filename);
+} else {
+ $lines = array();
+}
foreach ($users as $user) {
$$user = array();