Check if post exists when deleting

This commit is contained in:
Savetheinternet 2010-12-16 17:05:29 +11:00
parent a395805e58
commit f45d3fdb32

View File

@ -152,6 +152,10 @@
$id
), $sql) or error(mysql_error($sql));
if(mysql_num_rows($post_res) < 1) {
error(ERROR_INVALIDPOST);
}
// Delete posts and maybe replies
while($post = mysql_fetch_array($post_res)) {