Browse Source

Fix "Undefined index: sticky" and "locked" errors on new thread creation.

pull/40/head
Macil Tech 11 years ago
parent
commit
b078222ede
  1. 4
      inc/functions.php

4
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);

Loading…
Cancel
Save