diff options
author | TechSneeze <dave@techsneeze.com> | 2022-07-21 21:02:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-21 21:02:16 +0300 |
commit | 19c1ee3f55c19e8e25abadb790a4e9f70f92adc2 (patch) | |
tree | f77d59811ebdb367811ca5cc826de918e4d42031 | |
parent | a4e2a125ec673ef3c5720d65b2b105f7ee9bc929 (diff) | |
parent | 3f175c55c870758ff1bff4abbc83c30bd049a0de (diff) |
Merge branch 'master' into pgsql
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | dmarcts-report-viewer.php | 13 |
2 files changed, 14 insertions, 1 deletions
@@ -35,7 +35,7 @@ A PHP viewer for DMARC records that have been parsed by [John Levine's rddmarc s * A working webserver (apache, nginx, ...) with PHP -* Installed `php-mysql` or `php-pgsql` and `php-dom` +* Installed `php-mysql` or `php-pgsql` and `php-xml` ### Download dmarcts-report-viewer: ``` diff --git a/dmarcts-report-viewer.php b/dmarcts-report-viewer.php index 5730a3d..7b42cc6 100644 --- a/dmarcts-report-viewer.php +++ b/dmarcts-report-viewer.php @@ -301,6 +301,19 @@ foreach($query as $row) { $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( |