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.
Comments
Comment #2
qusai taha commentedComment #4
ivnishThanks!
Comment #5
ivnishComment #7
drumm(Updating to correct Drupal.org issue indexing issue, please disregard.)