From 56db0b0283d019759cd6c0d6d8795d5bc3e1586c Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Thu, 29 Sep 2011 21:17:59 +1000 Subject: [PATCH] Fixed bug regarding no-body posts (especially relevant to video embedding) --- post.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/post.php b/post.php index 1fc09cfe..6d9cc309 100644 --- a/post.php +++ b/post.php @@ -243,10 +243,8 @@ $post['mod'] = isset($_POST['mod']) && $_POST['mod']; if($post['has_file']) $post['filename'] = utf8tohtml(get_magic_quotes_gpc() ? stripslashes($_FILES['file']['name']) : $_FILES['file']['name']); - elseif(empty($post['body'])) - error($config['error']['tooshort_body']); - if($OP && $config['force_body_op'] || !$OP && $config['force_body']) { + if(!($post['has_file'] || isset($post['embed'])) || (($OP && $config['force_body_op']) || (!$OP && $config['force_body']))) { $stripped_whitespace = preg_replace('/[\s]/u', '', $post['body']); if(empty($stripped_whitespace )) { error($config['error']['tooshort_body']);