diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-05-08 15:16:16 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-05-08 15:16:16 +0000 |
commit | e1304697c4da2ad7f145956ffe440a63952be995 (patch) | |
tree | 006f92c40e05ff017a3f4e3e1bec4a6c711296e6 | |
parent | 823673a1969532063d6b915d62d42ee779a58c7b (diff) | |
download | brdo-e1304697c4da2ad7f145956ffe440a63952be995.tar.gz brdo-e1304697c4da2ad7f145956ffe440a63952be995.tar.bz2 |
- Patch #62350 by hunmonk: fixed problem with deleting forum containers.
-rw-r--r-- | modules/forum.module | 3 | ||||
-rw-r--r-- | modules/forum/forum.module | 3 |
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); |