Code Duplication    Length = 2-5 lines in 2 locations

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);

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.