mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 11:21:47 -05:00
maybe fixed null subjects
This commit is contained in:
parent
61879d5a67
commit
41bb30e64a
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue