Skip to content

Commit

Permalink
VACMS-18311: Prevent a php error when checking send permissions.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsasser committed Jul 11, 2024
1 parent fdef1d5 commit a1fddf1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ public function allowedToSend(Message $message, array $payload): bool {
// The allow list is comprehensive, so users not in the allow list, if
// present, are restricted.
if ($allow_only_to) {
return in_array($current_user, $payload['allow_delivery_only_to']);
return in_array($current_user, (array) $payload['allow_delivery_only_to']);
}
// If user is restricted, prevent sending.
if ($restrict_to) {
return !in_array($current_user, $payload['restrict_delivery_to']);
return !in_array($current_user, (array) $payload['restrict_delivery_to']);
}
// Default to allow sending.
return TRUE;
Expand Down

0 comments on commit a1fddf1

Please sign in to comment.