From fc0424c3434c2464094c019863169a3143dd1d65 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 6 May 2015 14:11:48 -0300 Subject: Simplify logic --- config/squid3/34/squid.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc index 55027430..d78aa27c 100755 --- a/config/squid3/34/squid.inc +++ b/config/squid3/34/squid.inc @@ -1224,9 +1224,12 @@ EOD; function squid_resync_upstream() { global $config; + + if (!is_array($config['installedpackages']['squidremote']['config'])) + $config['installedpackages']['squidremote']['config'] = array(); + $conf = "\n#Remote proxies\n"; - if (is_array($config['installedpackages']['squidremote']['config'])) - foreach ($config['installedpackages']['squidremote']['config'] as $settings) { + foreach ($config['installedpackages']['squidremote']['config'] as $settings) { if ($settings['enable'] == 'on') { $conf .= "cache_peer {$settings['proxyaddr']} {$settings['hierarchy']} {$settings['proxyport']} "; if ($settings['icpport'] == '7') -- cgit v1.2.3