diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2010-12-16 17:05:29 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2010-12-16 17:05:29 +1100 |
| commit | f45d3fdb32a932a7202c1e68331b442ae23d1a63 (patch) | |
| tree | 2fa584e1885a0173f5392c3ac77be41b6f230fc2 | |
| parent | a395805e580e07edef1d47eea43daf3fd92880d3 (diff) | |
Check if post exists when deleting
| -rw-r--r-- | inc/mod.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/inc/mod.php b/inc/mod.php index 46d966fe..a6cf3793 100644 --- a/inc/mod.php +++ b/inc/mod.php @@ -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)) { |
