Make the "to" field in the create thread form to be required

Created on 19 January 2023, over 1 year ago
Updated 30 January 2023, over 1 year ago

Problem/Motivation

If the user submits a message without adding the recipient, will face an error:

The website encountered an unexpected error. Please try again later.
TypeError: Drupal\privatemsg\PrivateMsgService::createThread(): Argument #5 ($recipient_id) must be of type int, null given, called in /var/www/html/snd/docroot/modules/contrib/privatemsg/src/Form/CreateThreadForm.php on line 129 in Drupal\privatemsg\PrivateMsgService->createThread() (line 306 of modules/contrib/privatemsg/src/PrivateMsgService.php).

Steps to reproduce

- Install the Privatemsg module and enable it.
- Try to send a message without adding the recipient.

Proposed resolution

- Make the To field as required.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan Qusai Taha Amman

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

Merge Requests

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