Browse Source

Fix condition when adding new forum thread

Angel Fernando Quiroz Campos 6 years ago
parent
commit
2f6d826c59
1 changed files with 1 additions and 1 deletions
  1. 1 1
      main/forum/newthread.php

+ 1 - 1
main/forum/newthread.php

@@ -68,7 +68,7 @@ if (api_is_in_gradebook()) {
 
 // 1. the forumcategory or forum is invisible (visibility==0) and the user is not a course manager
 if (!api_is_allowed_to_edit(false, true) &&
-    (($current_forum_category['visibility'] && $current_forum_category['visibility'] == 0) || $current_forum['visibility'] == 0)
+    (($current_forum_category && $current_forum_category['visibility'] == 0) || $current_forum['visibility'] == 0)
 ) {
     api_not_allowed();
 }