diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index 90b1f89..a7e6962 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -468,10 +468,10 @@ function forum_permission() {
 /**
  * Implements hook_taxonomy_term_delete().
  */
-function forum_taxonomy_term_delete($tid) {
+function forum_taxonomy_term_delete(stdClass $term) {
   // For containers, remove the tid from the forum_containers variable.
   $containers = variable_get('forum_containers', array());
-  $key = array_search($tid, $containers);
+  $key = array_search($term->tid, $containers);
   if ($key !== FALSE) {
     unset($containers[$key]);
   }
diff --git a/core/modules/forum/forum.test b/core/modules/forum/forum.test
index c7c3d9c..663b872 100644
--- a/core/modules/forum/forum.test
+++ b/core/modules/forum/forum.test
@@ -242,7 +242,7 @@ class ForumTestCase extends DrupalWebTestCase {
     // Save forum overview.
     $this->drupalPost('admin/structure/forum/', array(), t('Save'));
     $this->assertRaw(t('The configuration options have been saved.'));
-    // Delete this second form.
+    // Delete this second forum.
     $this->deleteForum($this->delete_forum['tid']);
     // Create forum at the top (root) level.
     $this->root_forum = $this->createForum('forum');
@@ -341,6 +341,11 @@ class ForumTestCase extends DrupalWebTestCase {
     // Assert that the forum no longer exists.
     $this->drupalGet('forum/' . $tid);
     $this->assertResponse(404, 'The forum was not found');
+
+    // Assert that the associated term has been removed from the
+    // forum_containers variable.
+    $containers = variable_get('forum_containers', array());
+    $this->assertFalse(in_array($tid, $containers), 'The forum_containers variable has been updated.');
   }
 
   /**
