Code Duplication    Length = 2-5 lines in 2 locations

Sources/PersonalMessage.php 1 location

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

Sources/Post.php 1 location

@@ 2784-2788 (lines=5) @@
2781
			$post_errors[] = 'no_message';
2782
			unset($_POST['message']);
2783
		}
2784
		elseif (!empty($modSettings['max_messageLength']) && $smcFunc['strlen']($_POST['message']) > $modSettings['max_messageLength'])
2785
		{
2786
			$post_errors[] = 'long_message';
2787
			unset($_POST['message']);
2788
		}
2789
		else
2790
		{
2791
			$_POST['message'] = $smcFunc['htmlspecialchars']($_POST['message'], ENT_QUOTES);