diff options
-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"); |