From 01f1c89f7c35cf44051e21760c7dc225b6397b08 Mon Sep 17 00:00:00 2001 From: Macil Tech Date: Sat, 8 Jun 2013 05:55:13 -0500 Subject: [PATCH] Fix "Undefined index: sticky" and "locked" errors on new thread creation. --- inc/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index 872c6c23..b83d6c86 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -722,13 +722,13 @@ function post(array $post) { $query->bindValue(':password', $post['password']); $query->bindValue(':ip', isset($post['ip']) ? $post['ip'] : $_SERVER['REMOTE_ADDR']); - if ($post['op'] && $post['mod'] && $post['sticky']) { + if ($post['op'] && $post['mod'] && isset($post['sticky']) && $post['sticky']) { $query->bindValue(':sticky', 1, PDO::PARAM_INT); } else { $query->bindValue(':sticky', 0, PDO::PARAM_INT); } - if ($post['op'] && $post['mod'] && $post['locked']) { + if ($post['op'] && $post['mod'] && isset($post['locked']) && $post['locked']) { $query->bindValue(':locked', 1, PDO::PARAM_INT); } else { $query->bindValue(':locked', 0, PDO::PARAM_INT);