diff options
-rw-r--r-- | dmarcts-report-viewer.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/dmarcts-report-viewer.php b/dmarcts-report-viewer.php index 180fee9..e6e32e4 100644 --- a/dmarcts-report-viewer.php +++ b/dmarcts-report-viewer.php @@ -309,6 +309,19 @@ while($row = $query->fetch_assoc()) { $periods[] = sprintf( "%'.04d-%'.02d", $row['year'], $row['month'] ); } +// When arrays of data do not exist, for example in a new & empty set-up, create empty arrays +// -------------------------------------------------------------------------- +if(!isset($domains)){ + $domains = array(); +} +if(!isset($orgs)){ + $orgs = array(); +} +if(!isset($periods)){ + $periods = array(); +} + + // Generate Page with report list and report data (if a report is selected). // -------------------------------------------------------------------------- echo html( |