Fix the bug that allowed to post an empty reply
This commit is contained in:
parent
db3c7f4ee9
commit
a1d2d2388a
2
post.php
2
post.php
@ -344,7 +344,7 @@ if (isset($_POST['delete'])) {
|
|||||||
$post['email'] = str_replace(' ', '%20', htmlspecialchars($_POST['email']));
|
$post['email'] = str_replace(' ', '%20', htmlspecialchars($_POST['email']));
|
||||||
$post['body'] = $_POST['body'];
|
$post['body'] = $_POST['body'];
|
||||||
$post['password'] = $_POST['password'];
|
$post['password'] = $_POST['password'];
|
||||||
$post['has_file'] = (!isset($post['embed']) && (($post['op'] && !isset($post['no_longer_require_an_image_for_op']) && $config['force_image_op']) || !empty($_FILES)));
|
$post['has_file'] = (!isset($post['embed']) && (($post['op'] && !isset($post['no_longer_require_an_image_for_op']) && $config['force_image_op']) || !empty($_FILES['file']['name'])));
|
||||||
|
|
||||||
if (!($post['has_file'] || isset($post['embed'])) || (($post['op'] && $config['force_body_op']) || (!$post['op'] && $config['force_body']))) {
|
if (!($post['has_file'] || isset($post['embed'])) || (($post['op'] && $config['force_body_op']) || (!$post['op'] && $config['force_body']))) {
|
||||||
$stripped_whitespace = preg_replace('/[\s]/u', '', $post['body']);
|
$stripped_whitespace = preg_replace('/[\s]/u', '', $post['body']);
|
||||||
|
Loading…
Reference in New Issue
Block a user