From 70ce91629d582727ad6662441ec043466c3cdab2 Mon Sep 17 00:00:00 2001 From: Seth Mos Date: Tue, 31 Mar 2009 15:23:35 +0200 Subject: Make sure to handle a empty settings array correctly --- etc/inc/gwlb.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'etc/inc/gwlb.inc') diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index eda38de..b35a4a2 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -41,15 +41,15 @@ function setup_gateways_monitor() { global $g; $gateways_arr = return_gateways_array(); - if (!is_array($config['gateways']['settings'])) { + if (is_array($config['gateways']['settings'])) { + $a_settings = &$config['gateways']['settings']; + } else { $a_settings['latencylow'] = "10"; $a_settings['latencyhigh'] = "20"; $a_settings['losslow'] = "100"; $a_settings['losshigh'] = "500"; } - $a_settings = &$config['gateways']['settings']; - /* kill apinger process */ if(is_process_running("apinger")) mwexec("/usr/bin/killall apinger", true); -- cgit v1.1