diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-02-16 19:32:54 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-02-16 19:32:54 +0000 |
commit | 549912e311288ce91b7567e7f87976385bc025dc (patch) | |
tree | 73312215ae38cd557f2eda4fa5d9c665a460b68d /usr/local/www | |
parent | b80900603d431fc39dd1c15e0b74f12e1639fbfa (diff) | |
download | pfsense-549912e311288ce91b7567e7f87976385bc025dc.zip pfsense-549912e311288ce91b7567e7f87976385bc025dc.tar.gz |
Check that $pkg['adddeleteeditpagefields']['columnitem'] exists before foreaching through it.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/pkg.php | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/usr/local/www/pkg.php b/usr/local/www/pkg.php index fe3c261..9b6eec2 100755 --- a/usr/local/www/pkg.php +++ b/usr/local/www/pkg.php @@ -123,25 +123,26 @@ include("fbegin.inc"); if($evaledvar) foreach ($evaledvar as $ip) { echo "<tr valign=\"top\">\n"; - foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) { - ?> - <td class="listlr"> - <?php - $toeval="\$fieldname = \$ip['" . xml_safe_fieldname($column['fieldname']) . "'];"; - eval($toeval); - if($column['type'] == "checkbox") { - if($fieldname == "") { - echo "No"; - } else { - echo "Yes"; - } - } else { - echo $fieldname; - } - ?> - </td> - <?php - } + if($pkg['adddeleteeditpagefields']['columnitem'] <> "") + foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) { + ?> + <td class="listlr"> + <?php + $toeval="\$fieldname = \$ip['" . xml_safe_fieldname($column['fieldname']) . "'];"; + eval($toeval); + if($column['type'] == "checkbox") { + if($fieldname == "") { + echo "No"; + } else { + echo "Yes"; + } + } else { + echo $fieldname; + } + ?> + </td> + <?php + } ?> <td valign="middle" class="list" nowrap> <a href="pkg_edit.php?xml=<?=$xml?>&act=edit&id=<?=$i;?>"><img src="e.gif" width="17" height="17" border="0"></a> |