summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/forum.module3
-rw-r--r--modules/forum/forum.module3
2 files changed, 4 insertions, 2 deletions
diff --git a/modules/forum.module b/modules/forum.module
index 8589b4d0a..6a27f6855 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -160,7 +160,8 @@ function forum_taxonomy($op, $type, $term = NULL) {
// For containers, remove the tid from the forum_containers variable.
$containers = variable_get('forum_containers', array());
- if ($key = array_search($term['tid'], $containers)) {
+ $key = array_search($term['tid'], $containers);
+ if ($key !== FALSE) {
unset($containers[$key]);
}
variable_set('forum_containers', $containers);
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 8589b4d0a..6a27f6855 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -160,7 +160,8 @@ function forum_taxonomy($op, $type, $term = NULL) {
// For containers, remove the tid from the forum_containers variable.
$containers = variable_get('forum_containers', array());
- if ($key = array_search($term['tid'], $containers)) {
+ $key = array_search($term['tid'], $containers);
+ if ($key !== FALSE) {
unset($containers[$key]);
}
variable_set('forum_containers', $containers);