diff options
author | doktornotor <notordoktor@gmail.com> | 2015-11-17 02:09:05 +0100 |
---|---|---|
committer | doktornotor <notordoktor@gmail.com> | 2015-11-17 02:09:05 +0100 |
commit | 782326b2301855f60ef4c2b98c78babe821ef229 (patch) | |
tree | 37108a6159ed6ef2c63d859dab3b76698db1f115 /config | |
parent | 11dd2b4dfd33040fe389b951b1d43fb6a2f1da2e (diff) | |
download | pfsense-packages-782326b2301855f60ef4c2b98c78babe821ef229.tar.gz pfsense-packages-782326b2301855f60ef4c2b98c78babe821ef229.tar.bz2 pfsense-packages-782326b2301855f60ef4c2b98c78babe821ef229.zip |
Make sure config item is an array
Diffstat (limited to 'config')
-rw-r--r-- | config/siproxd/siproxd.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/config/siproxd/siproxd.inc b/config/siproxd/siproxd.inc index f97025a8..9eae2567 100644 --- a/config/siproxd/siproxd.inc +++ b/config/siproxd/siproxd.inc @@ -77,7 +77,12 @@ function sync_package_siproxd_users() { function siproxd_generate_rules($type) { global $config; - $siproxd_conf = &$config['installedpackages']['siproxdsettings']['config'][0]; + if (is_array($config['installedpackages']['siproxdsettings'])) { + $siproxd_conf = &$config['installedpackages']['siproxdsettings']['config'][0]; + } else { + $siproxd_conf = array(); + } + if (!is_service_running('siproxd')) { log_error("[siproxd] Package is installed but not started. Not installing firewall rules."); return; @@ -156,7 +161,7 @@ function sync_package_siproxd() { fwrite($fout, "# package management system.\n\n"); /* if proxy is turned off in package settings, stop service, remove rc script and do nothing else */ - if ($siproxd_conf['sipenable'] == "0") { + if ($siproxd_conf['sipenable'] != "on") { fclose($fout); if (is_service_running('siproxd')) { stop_service("siproxd"); |