Skip to content

Commit

Permalink
Fix multiple attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
hivepress committed Jul 21, 2021
1 parent 5fa476e commit 92c579d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/controllers/class-message.php
Expand Up @@ -145,7 +145,11 @@ public function send_message( $request ) {
if ( $message_draft && $message_draft->get_attachment__id() ) {

// Get attachments.
$attachments = (array) $message_draft->get_attachment();
$attachments = $message_draft->get_attachment();

if ( ! is_array( $attachments ) ) {
$attachments = [ $attachments ];
}

if ( $attachments ) {

Expand Down

0 comments on commit 92c579d

Please sign in to comment.