diff options
| author | Jano Slota <jano@alokal.eu> | 2014-07-04 23:15:47 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2014-07-06 01:29:30 +0200 |
| commit | a1d2d2388a24b7fa3dbf51a1dea5e9d2d3577cc8 (patch) | |
| tree | 8b2b3b9e6d33084cea481a287d417d0f3167a174 | |
| parent | db3c7f4ee984002fccb86e0cb3fda45edde74351 (diff) | |
Fix the bug that allowed to post an empty reply
| -rw-r--r-- | post.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -344,7 +344,7 @@ if (isset($_POST['delete'])) { $post['email'] = str_replace(' ', '%20', htmlspecialchars($_POST['email'])); $post['body'] = $_POST['body']; $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']))) { $stripped_whitespace = preg_replace('/[\s]/u', '', $post['body']); |
