summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorMacil Tech <maciltech@gmail.com>2013-06-08 05:55:13 -0500
committerMacil Tech <maciltech@gmail.com>2013-06-18 12:00:26 -0500
commitb078222ede702b8ecf4b28f5ebd6db5c34b65143 (patch)
tree58e0961ec07672b5f001c6651f801f273f9c5a54 /inc
parenta5e5cd03e6936e17b91acfb485c7e8a19b4c0b2a (diff)
Fix "Undefined index: sticky" and "locked" errors on new thread creation.
Diffstat (limited to 'inc')
-rw-r--r--inc/functions.php4
1 files 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);