aboutsummaryrefslogtreecommitdiffstats
path: root/packages/spamd.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-04-17 00:06:02 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-04-17 00:06:02 +0000
commitbba4415322a91af403dd58c76e7e57d281608ec3 (patch)
tree4f01244c1fea283a28d96b67f25733eba133aa84 /packages/spamd.inc
parent33e10f2c7ce251a696923b1c2dc68c4827a2b550 (diff)
downloadpfsense-packages-bba4415322a91af403dd58c76e7e57d281608ec3.tar.gz
pfsense-packages-bba4415322a91af403dd58c76e7e57d281608ec3.tar.bz2
pfsense-packages-bba4415322a91af403dd58c76e7e57d281608ec3.zip
Do not foreach through non-existant configuration area.
Diffstat (limited to 'packages/spamd.inc')
-rw-r--r--packages/spamd.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/spamd.inc b/packages/spamd.inc
index 83a3ca11..e3ccc61b 100644
--- a/packages/spamd.inc
+++ b/packages/spamd.inc
@@ -36,8 +36,10 @@ function sync_package_spamd() {
$fd = fopen("/etc/spamd.conf","w");
/* all header */
fwrite($fd, "all:\\\n\t:whitelist:blacklist");
- foreach($config['installedpackages']['spamdsources']['config'] as $spamd) {
- fwrite($fd, ":" . remove_spaces($spamd['providername']));
+ if($config['installedpackages']['spamdsources']['config']) {
+ foreach($config['installedpackages']['spamdsources']['config'] as $spamd) {
+ fwrite($fd, ":" . remove_spaces($spamd['providername']));
+ }
}
fwrite($fd, ":\n\n");
fwrite($fd, "whitelist:\\\n");