diff --git a/classes/class_invite_tree.php b/classes/class_invite_tree.php index a38cc128..a6ac25e8 100644 --- a/classes/class_invite_tree.php +++ b/classes/class_invite_tree.php @@ -39,7 +39,7 @@ function make_tree(){ list($TreePosition, $TreeID, $TreeLevel, $MaxPosition) = $DB->next_record(); if(!$MaxPosition){ $MaxPosition = 1000000; } // $MaxPermission is null if the user is the last one in that tree on that level if(!$TreeID){ return; } - $DB->query(" + $TreeQuery = $DB->query(" SELECT it.UserID, Username, @@ -135,7 +135,8 @@ function make_tree(){ ?> set_query_id($TreeQuery); + } $Tree = ob_get_clean(); if($Count){ diff --git a/sections/forums/index.php b/sections/forums/index.php index dcbedb80..77add2da 100644 --- a/sections/forums/index.php +++ b/sections/forums/index.php @@ -42,6 +42,7 @@ $Forums[$ForumID]['SpecificRules'] = $ThreadIDs; } } + unset($ForumID, $Forum); $Cache->cache_value('forums_list', $Forums, 0); //Inf cache. }