I've seen this in a couple of places where a line line this:

public function notify(MaestroNotification &$obj) {
  # ...
  # ...
  # ...
  $to = $obj->getUserEmailAddresses($userID);

is followed by something like this:

  $params = array('message' => $obj->getMessage(), 'subject' => $obj->getSubject(), 'queueID' => $obj->getQueueId());
  $result   = drupal_mail('maestro', $obj->getNotificationType(), $to, language_default(), $params, $from, $send);

The problem is that in the rare case where there is more than one email address an array gets returned when the code is written to only handle a string. Now the issue is probably deeper than that because what I am looking at right now is an empty array however I suspect that is a different issue that is bringing this issue to light by way of cascading.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Reg’s picture

Patch to fix this attached.

_randy’s picture

I don't think I understand this edge case - notifications are sent out to the list of people from the engine. I'd have to trace through what your situation is and why you'd be getting an array in an array for the TO field values.