diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-04-17 00:06:02 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-04-17 00:06:02 +0000 |
commit | bba4415322a91af403dd58c76e7e57d281608ec3 (patch) | |
tree | 4f01244c1fea283a28d96b67f25733eba133aa84 /packages | |
parent | 33e10f2c7ce251a696923b1c2dc68c4827a2b550 (diff) | |
download | pfsense-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')
-rw-r--r-- | packages/spamd.inc | 6 |
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"); |