commit 9731dd2a9098cabc84d3a138f494be0f38729ce4
parent 49fa52cf7b69af4f602999abcbc742d8f54a2b04
Author: MTRNord <mtrnord1@gmail.com>
Date: Sat, 16 May 2015 14:01:07 +0200
why?
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/core/backend/blog/posts.php b/core/backend/blog/posts.php
@@ -170,12 +170,15 @@ function shortText($string,$lenght) {
//$longtext = $post_text;
function deletePost($id) {
+ include($root . '/core/config/connect.db.inc.php');
global $connection;
$stmt = $connection->prepare('DELETE FROM posts WHERE id=?');
$stmt->bind_param('i',$id);
+ if ($stmt === FALSE) {
+ die($mysqli->error);
+ }
$stmt->execute();
- $connection->close();
}