summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-02-16 19:32:54 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-02-16 19:32:54 +0000
commit549912e311288ce91b7567e7f87976385bc025dc (patch)
tree73312215ae38cd557f2eda4fa5d9c665a460b68d /usr/local/www
parentb80900603d431fc39dd1c15e0b74f12e1639fbfa (diff)
downloadpfsense-549912e311288ce91b7567e7f87976385bc025dc.zip
pfsense-549912e311288ce91b7567e7f87976385bc025dc.tar.gz
Check that $pkg['adddeleteeditpagefields']['columnitem'] exists before foreaching through it.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/pkg.php39
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>
&nbsp;<a href="pkg_edit.php?xml=<?=$xml?>&act=edit&id=<?=$i;?>"><img src="e.gif" width="17" height="17" border="0"></a>
OpenPOWER on IntegriCloud