summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Southall <applemansigloo@gmail.com>2017-03-03 15:25:30 +0900
committerBenjamin Southall <applemansigloo@gmail.com>2017-03-03 15:25:30 +0900
commit2c678488eee09e51578bf67215ae4a5625af17da (patch)
treed54851f8ede4269cb5f78c96174eae564b61cc2e
parent3eea75ef77a2b6f4b66bd0216259d66f4fe72f83 (diff)
Add additonal brackets to min_body post length check in order to ensure operation precedence
-rw-r--r--post.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/post.php b/post.php
index 835633b8..0be1da5d 100644
--- a/post.php
+++ b/post.php
@@ -733,7 +733,7 @@ if (isset($_POST['delete'])) {
error(sprintf($config['error']['toolong'], 'subject'));
if (!$mod && mb_strlen($post['body']) > $config['max_body'])
error($config['error']['toolong_body']);
- if (!$mod && mb_strlen($post['body']) > 0 && mb_strlen($post['body']) < $config['min_body'])
+ if (!$mod && mb_strlen($post['body']) > 0 && (mb_strlen($post['body']) < $config['min_body']))
error($config['error']['tooshort_body']);
if (mb_strlen($post['password']) > 20)
error(sprintf($config['error']['toolong'], 'password'));