Code Duplication    Length = 2-5 lines in 2 locations

Sources/PersonalMessage.php 1 location

@@ 2371-2372 (lines=2) @@
2368
		$post_errors[] = 'no_subject';
2369
	if (!isset($_REQUEST['message']) || $_REQUEST['message'] == '')
2370
		$post_errors[] = 'no_message';
2371
	elseif (!empty($modSettings['max_messageLength']) && $smcFunc['strlen']($_REQUEST['message']) > $modSettings['max_messageLength'])
2372
		$post_errors[] = 'long_message';
2373
	else
2374
	{
2375
		// Preparse the message.

Sources/Post.php 1 location

@@ 2750-2754 (lines=5) @@
2747
			$post_errors[] = 'no_message';
2748
			unset($_POST['message']);
2749
		}
2750
		elseif (!empty($modSettings['max_messageLength']) && $smcFunc['strlen']($_POST['message']) > $modSettings['max_messageLength'])
2751
		{
2752
			$post_errors[] = 'long_message';
2753
			unset($_POST['message']);
2754
		}
2755
		else
2756
		{
2757
			$_POST['message'] = $smcFunc['htmlspecialchars']($_POST['message'], ENT_QUOTES);