diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-05-17 22:11:12 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-05-17 22:11:12 +0000 |
commit | 25a709a1f30626ebaaa396ca3e2c55d33b5ec7f6 (patch) | |
tree | 33db771108c0ba7726b53cc4db841729b3dc7755 | |
parent | e52c0f5d41ad9319c9420bbe3a9dcfa76a90222f (diff) | |
download | brdo-25a709a1f30626ebaaa396ca3e2c55d33b5ec7f6.tar.gz brdo-25a709a1f30626ebaaa396ca3e2c55d33b5ec7f6.tar.bz2 |
- Patch 7840 by Drumm: fixed warning.
-rw-r--r-- | modules/aggregator.module | 8 | ||||
-rw-r--r-- | modules/aggregator/aggregator.module | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/modules/aggregator.module b/modules/aggregator.module index 62e131a78..0377196c9 100644 --- a/modules/aggregator.module +++ b/modules/aggregator.module @@ -583,9 +583,11 @@ function aggregator_save_feed($edit) { } if ($edit['title']) { // the feed is being saved, save the categories as well - foreach ($edit['category'] as $cid => $checked) { - if ($checked) { - db_query('INSERT INTO {aggregator_category_feed} (fid, cid) VALUES (%d, %d)', $edit['fid'], $cid); + if ($edit['category']) { + foreach ($edit['category'] as $cid => $checked) { + if ($checked) { + db_query('INSERT INTO {aggregator_category_feed} (fid, cid) VALUES (%d, %d)', $edit['fid'], $cid); + } } } } diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 62e131a78..0377196c9 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -583,9 +583,11 @@ function aggregator_save_feed($edit) { } if ($edit['title']) { // the feed is being saved, save the categories as well - foreach ($edit['category'] as $cid => $checked) { - if ($checked) { - db_query('INSERT INTO {aggregator_category_feed} (fid, cid) VALUES (%d, %d)', $edit['fid'], $cid); + if ($edit['category']) { + foreach ($edit['category'] as $cid => $checked) { + if ($checked) { + db_query('INSERT INTO {aggregator_category_feed} (fid, cid) VALUES (%d, %d)', $edit['fid'], $cid); + } } } } |