diff --git a/Project-Unite/Controllers/ForumController.cs b/Project-Unite/Controllers/ForumController.cs index 4236286..c416cbd 100644 --- a/Project-Unite/Controllers/ForumController.cs +++ b/Project-Unite/Controllers/ForumController.cs @@ -254,6 +254,10 @@ public ActionResult CreateTopic(CreateTopicViewModel model) return new HttpStatusCodeResult(404); string subjectId = model.Subject; + + if (String.IsNullOrWhiteSpace(model.Subject) == true) + ViewBag.Error = "hey no null subjects"; + char[] badChars = subjectId.Where(x => !AllowedChars.Contains(x)).ToArray(); foreach(var c in badChars)