body message saving empty space

Created on 17 March 2015, over 9 years ago
Updated 29 May 2023, about 1 year ago

Hi,

if (!empty($message->thread_id) && ($message->body === NULL || $message->body === '') ) {
if ($form) {
form_set_error('body', t('You must include a message in your reply.'));
}
else {
$messages['error'][] = t('A message must be included in your reply.');
}
}

Please add trim($message->body).

Reason is if i enter blank message above the validation take place. But in press enter key(with out typing anything) then blank message is saving. Please add trim($message->body). It will trim and check $message->body content.

Regards
tssarun.

🐛 Bug report
Status

Closed: outdated

Version

1.4

Component

Code

Created by

🇮🇳India tssarun

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024