Add additonal brackets to min_body post length check in order to ensure operation precedence

This commit is contained in:
Benjamin Southall 2017-03-03 15:25:30 +09:00 committed by -
parent cdde6f24b6
commit b8fe9569f7

View File

@ -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'));