mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Check for an empty <config/> as the first setting for a given package's config. When present, this breaks saving for certain packages (namely Squid's caching tab).
This commit is contained in:
parent
bef28e2d56
commit
a2a7f74df4
@ -96,6 +96,11 @@ if($pkg['custom_php_global_functions'] <> "")
|
||||
if(!is_array($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']))
|
||||
$config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config'] = array();
|
||||
|
||||
// If the first entry in the array is an empty <config/> tag, kill it.
|
||||
if ((count($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']) > 0)
|
||||
&& ($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config'][0] == ""))
|
||||
array_shift($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']);
|
||||
|
||||
$a_pkg = &$config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config'];
|
||||
|
||||
if($_GET['savemsg'] <> "")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user