summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/aggregator.module8
-rw-r--r--modules/aggregator/aggregator.module8
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);
+ }
}
}
}