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.

CommentFileSizeAuthor
#2 3334725-2.patch726 bytesqusai taha

Issue fork privatemsg-3334725

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Qusai Taha created an issue. See original summary.

qusai taha’s picture

Assigned: qusai taha » Unassigned
Status: Active » Needs review
StatusFileSize
new726 bytes

ivnish’s picture

Thanks!

ivnish’s picture

Status: Needs review » Fixed

  • ivnish committed e699d55b on 1.0.x authored by Qusai Taha
    Issue #3334725 by Qusai Taha, ivnish: Make the "to" field in the create...
drumm’s picture

(Updating to correct Drupal.org issue indexing issue, please disregard.)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.