diff options
Diffstat (limited to 'config/widget-snort')
-rw-r--r-- | config/widget-snort/snort_alerts.widget.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/config/widget-snort/snort_alerts.widget.php b/config/widget-snort/snort_alerts.widget.php index 9b5b2b64..c2622dc7 100644 --- a/config/widget-snort/snort_alerts.widget.php +++ b/config/widget-snort/snort_alerts.widget.php @@ -34,8 +34,10 @@ global $config, $g; <td width="40%" class="widgetsubheader">Src/Dst</td> <td width="40%" class="widgetsubheader">Details</td> </tr> -<?php $counter=0; - foreach ($snort_alerts as $alert) { ?> +<?php +$counter=0; +if (is_array($snort_alerts)) { + foreach ($snort_alerts as $alert) { ?> <?php if(isset($config['syslog']['reverse'])) { @@ -60,6 +62,7 @@ global $config, $g; <td width="40%" class="listr"><?= 'Pri : ' . $alert["priority"] . '<br>' . 'Cat : ' . $alert['category'] ?></td> </tr> <?php $counter++; - } ?> + } +} ?> </tbody> </table> |