diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-10-02 15:46:28 -0400 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-10-02 15:46:28 -0400 |
commit | 86a20575ca00ca6ee7c36977289b1bbe66dea3b2 (patch) | |
tree | 27a8ce1d3e894ec66386255b2356a90f2d6162d3 /src/usr/local/www/pkg_edit.php | |
parent | 2c2fed9251717f19e6e6dfa8d6c32fa7902f8bf2 (diff) | |
download | pfsense-86a20575ca00ca6ee7c36977289b1bbe66dea3b2.zip pfsense-86a20575ca00ca6ee7c36977289b1bbe66dea3b2.tar.gz |
Create a Form_Section if hte XML has not yet defined one
https://forum.pfsense.org/index.php?topic=100249.0
Diffstat (limited to 'src/usr/local/www/pkg_edit.php')
-rw-r--r-- | src/usr/local/www/pkg_edit.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php index 3de6048..aac0adb 100644 --- a/src/usr/local/www/pkg_edit.php +++ b/src/usr/local/www/pkg_edit.php @@ -682,6 +682,11 @@ foreach ($pkg['fields']['field'] as $pkga) { } } + // If we get here but have no $section, the package config file probably had no listtopic field + // We can create a section with a generic name to fix that + if(!$section) + $section = new Form_Section(gettext('General options')); + switch ($pkga['type']) { // Creat an input element. The format is slightly different depending on whether we are composing a group, // section, or advanced section. This is true for every element type |