Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | maestro-array_to_string_conversion_error-2541106-1-D7.patch | 1.68 KB | Reg |
Comments
Comment #1
Reg CreditAttribution: Reg as a volunteer commentedPatch to fix this attached.
Comment #2
_randy CreditAttribution: _randy commentedI 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.