Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit f76b133

Browse files
author
Nathan Shaaban
committed
ignore useless posts in postQuestion
1 parent a5686a9 commit f76b133

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

public_html/teacher/postQuestion.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
$query=preg_replace('/(, (?!.*, ))/', '', $query);
1515
//TODO: ADD TEACHER PERMISSION CHECK RIGHT HERE! is this needed due to being in a teacher folder though?
1616
if($query===""){
17-
log_error("Nothing given","query is empty",$conn->error);
17+
// simply ignore this post.
18+
exit();
1819
}
1920
if(!$conn->query("UPDATE `questions` SET ".$query." WHERE `key`=".$_GET["key"])){
2021
log_error("question update","database error",$conn->error);

0 commit comments

Comments
 (0)