0374f83c by Marty Penner

Ensure that Mandrill mail responses are checked if they are arrays

1 parent 2d6a8eb0
......@@ -271,7 +271,8 @@ function send_triggered_notification($uid = 0, $trigger = "NO_TRIGGER", $args =
if (CBV\system_can_send_emails()) {
$response = \wpMandrill::mail($to_email, $subject, !empty($html) ? $html : $alttext, [], $attachments);
if (
isset($response[0]['status'])
is_array($response)
&& isset($response[0]['status'])
&& isset($response[0]['status'])
&& !in_array($response['status'], ['rejected', 'invalid'])
) {
......