summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-11-14 23:51:29 +0100
committeremkael <emkael@tlen.pl>2018-11-14 23:51:29 +0100
commit384daa62f4daef2ffead4dc6ab44fec3ca6f248b (patch)
treebb8b6fa623500ae75a803c56bad47642bac8c165
parent3abb3c0eb3a36e43cd961b607d465a8ff713f7e7 (diff)
Not trying to access baord DB if it doesn't exist
-rw-r--r--tdd/tdd-bootstrap.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/tdd/tdd-bootstrap.php b/tdd/tdd-bootstrap.php
index b1b89a9..551c9ed 100644
--- a/tdd/tdd-bootstrap.php
+++ b/tdd/tdd-bootstrap.php
@@ -261,7 +261,9 @@ class BoardDB {
public function __construct($timestampFile = '.tdd-timestamps.cache', $dbFile = '.tdd-records.cache') {
$this->__timestampFile = $timestampFile;
$this->__dbFile = $dbFile;
- $this->__database = unserialize(file_get_contents($this->__dbFile));
+ if (file_exists($this->__dbFile)) {
+ $this->__database = unserialize(file_get_contents($this->__dbFile));
+ }
$this->refreshBoardDatabase();
}