diff options
author | jim-p <jimp@pfsense.org> | 2010-11-29 11:19:27 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-11-29 11:19:27 -0500 |
commit | cd08dddcad3119164b5149ef281c3ad89f8112e3 (patch) | |
tree | f972a273338d48a6defeb59fd913dcdb7fc91b91 /config/widget-havp | |
parent | fd1235b89a0e43deb7bc2d3720fe32cfbef8e16c (diff) | |
download | pfsense-packages-cd08dddcad3119164b5149ef281c3ad89f8112e3.tar.gz pfsense-packages-cd08dddcad3119164b5149ef281c3ad89f8112e3.tar.bz2 pfsense-packages-cd08dddcad3119164b5149ef281c3ad89f8112e3.zip |
Test array before foreach
Diffstat (limited to 'config/widget-havp')
-rw-r--r-- | config/widget-havp/havp_alerts.widget.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/config/widget-havp/havp_alerts.widget.php b/config/widget-havp/havp_alerts.widget.php index 57614fa1..f8265d11 100644 --- a/config/widget-havp/havp_alerts.widget.php +++ b/config/widget-havp/havp_alerts.widget.php @@ -33,7 +33,9 @@ global $config, $g; <td width="25%" class="widgetsubheader">Date</td> <td width="75%" class="widgetsubheader">Details</td> </tr> -<?php $counter=0; +<?php +$counter=0; +if (is_array($havp_alerts)) { foreach ($havp_alerts as $alert) { ?> <?php @@ -58,6 +60,7 @@ global $config, $g; <td width="75%" class="listr"><?= $alert["url"] . "<br>" . $alert["virusname"] ?></td> </tr> <?php $counter++; - } ?> + } +} ?> </tbody> </table> |