summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-02-09 23:46:14 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-02-09 23:46:14 +0000
commit66952258c8f534bf19b2f90f3eaa6be248d876ae (patch)
tree233cc2ca3e001882c07563b41d68c01eb367eb80 /usr
parent8cd9e1a2286c45a1113139fccf4b5028ab1f6d86 (diff)
downloadpfsense-66952258c8f534bf19b2f90f3eaa6be248d876ae.zip
pfsense-66952258c8f534bf19b2f90f3eaa6be248d876ae.tar.gz
Make sure items are an array if we foreach() through them.
Ticket #829
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/system_firmware_check.php26
1 files changed, 16 insertions, 10 deletions
diff --git a/usr/local/www/system_firmware_check.php b/usr/local/www/system_firmware_check.php
index f791fe4..85cbc98 100755
--- a/usr/local/www/system_firmware_check.php
+++ b/usr/local/www/system_firmware_check.php
@@ -154,19 +154,24 @@ if(is_array($versions)) {
<td width="20%" class="listhdr">Type</td>
</tr>
<?php
- foreach($versions as $key => $value) {
- if(($key == "current") or ($value == 1)) continue;
- foreach($value as $version) {
- if(!$version['time']) $version['time'] = "Unknown";
- if(!$version['size']) $version['size'] = "Unknown";
- if(!$version['type']) $version['type'] = "Unknown";
- $version['category'] = $key;
- $times[$version['time']][] = $version;
+ if(is_array($versions)) {
+ foreach($versions as $key => $value) {
+ if(($key == "current") or ($value == 1)) continue;
+ if(is_array($value)) {
+ foreach($value as $version) {
+ if(!$version['time']) $version['time'] = "Unknown";
+ if(!$version['size']) $version['size'] = "Unknown";
+ if(!$version['type']) $version['type'] = "Unknown";
+ $version['category'] = $key;
+ $times[$version['time']][] = $version;
+ }
+ }
}
}
asort($times);
- foreach($times as $time) {
- foreach($time as $version) {
+ if(is_array($times)) {
+ foreach($times as $time) {
+ foreach($time as $version) {
?>
<tr>
<td class="listlr">
@@ -184,6 +189,7 @@ if(is_array($versions)) {
<td class="listlr"><?= ucfirst($version['type']) ?></td>
</tr>
<?php
+ }
}
}
?>
OpenPOWER on IntegriCloud