summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2009-12-03 13:08:12 +0100
committerSeth Mos <seth.mos@xs4all.nl>2009-12-03 13:14:30 +0100
commit0b5b4f327a1d092890ea587e6088ecd76c49c1e0 (patch)
tree06ce1ea57899cef41e705bd33ef132ea6fe79439 /etc/inc
parent1e578a7f10843f470d2bf5274bbef695a14bb9d0 (diff)
downloadpfsense-0b5b4f327a1d092890ea587e6088ecd76c49c1e0.zip
pfsense-0b5b4f327a1d092890ea587e6088ecd76c49c1e0.tar.gz
Extra protection to prevent empty load_balancer arrays on configuration upgrades
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/upgrade_config.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index 1414e44..61dca44 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -818,6 +818,9 @@ function upgrade_045_to_046() {
}
}
}
+ if(count($config['load_balancer']) == 0) {
+ unset($config['load_balancer']);
+ }
}
@@ -1529,6 +1532,9 @@ function upgrade_053_to_054() {
// Unset lbpool if we no longer have any server pools
if (count($lbpool_srv_arr) == 0) {
unset($config['load_balancer']['lbpool']);
+ if(count($config['load_balancer']) == 0) {
+ unset($config['load_balancer']);
+ }
} else {
$config['load_balancer']['lbpool'] = $lbpool_srv_arr;
}
@@ -1777,4 +1783,4 @@ function upgrade_059_to_060() {
}
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud