diff options
author | jim-p <jimp@pfsense.org> | 2016-03-11 10:45:49 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2016-03-11 10:45:49 -0500 |
commit | fff6a2afad957d0ab71033a0747a46dc19c67d91 (patch) | |
tree | 9250c933de2a0a95a49e30f295aeee0523b7e5aa /src/usr | |
parent | b95e3de4cb39e0b3ef6a0f042b2c96b041019522 (diff) | |
download | pfsense-fff6a2afad957d0ab71033a0747a46dc19c67d91.zip pfsense-fff6a2afad957d0ab71033a0747a46dc19c67d91.tar.gz |
Some safety belts to avoid presenting PHP errors to the user. Ticket #5973
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/pkg_edit.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php index b62e057..785f1ea 100644 --- a/src/usr/local/www/pkg_edit.php +++ b/src/usr/local/www/pkg_edit.php @@ -678,6 +678,9 @@ if ($pkg['advanced_options'] == "enabled") { $js_array = array(); // Now loop through all of the fields defined in the XML +if (!is_array($pkg['fields']['field'])) { + $pkg['fields']['field'] = array(); +} foreach ($pkg['fields']['field'] as $pkga) { $action = ""; @@ -1497,7 +1500,9 @@ foreach ($pkg['fields']['field'] as $pkga) { $i++; } // e-o-foreach field described in the XML -$form->add($section); +if ($section) { + $form->add($section); +} $form->addGlobal(new Form_Input( 'id', |