From 91a60aa878e703ff9af714e0316828216d3dcfa3 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 19 Aug 2010 11:00:42 -0400 Subject: [PATCH] [ticket/7716] Data too long for column 'message_subject' PHPBB3-7716 --- phpBB/includes/functions_privmsgs.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index c4cbb7ca1e..ec05a2a555 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1316,6 +1316,10 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) // Recipient Information $recipients = $to = $bcc = array(); + // First of all make sure the subject are having the correct length. + // To achieve this without cutting off between special chars we convert to an array and then count the elements. + $subject = truncate_string($subject); + if ($mode != 'edit') { // Build Recipient List