diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumBlockTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumBlockTest.php
index 2ba2d86..dec6955 100644
--- a/core/modules/forum/lib/Drupal/forum/Tests/ForumBlockTest.php
+++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumBlockTest.php
@@ -99,7 +99,6 @@ public function testActiveForumTopicsBlock() {
 
     // Comment on the first 5 topics.
     $date = new DrupalDateTime();
-    $langcode = Language::LANGCODE_NOT_SPECIFIED;
     for ($index = 0; $index < 5; $index++) {
       // Get the node from the topic title.
       $node = $this->drupalGetNodeByTitle($topics[$index]);
