Ensure that Mandrill mail responses are checked if they are arrays
Showing
1 changed file
with
2 additions
and
1 deletions
| ... | @@ -271,7 +271,8 @@ function send_triggered_notification($uid = 0, $trigger = "NO_TRIGGER", $args = | ... | @@ -271,7 +271,8 @@ function send_triggered_notification($uid = 0, $trigger = "NO_TRIGGER", $args = |
| 271 | if (CBV\system_can_send_emails()) { | 271 | if (CBV\system_can_send_emails()) { |
| 272 | $response = \wpMandrill::mail($to_email, $subject, !empty($html) ? $html : $alttext, [], $attachments); | 272 | $response = \wpMandrill::mail($to_email, $subject, !empty($html) ? $html : $alttext, [], $attachments); |
| 273 | if ( | 273 | if ( |
| 274 | isset($response[0]['status']) | 274 | is_array($response) |
| 275 | && isset($response[0]['status']) | ||
| 275 | && isset($response[0]['status']) | 276 | && isset($response[0]['status']) |
| 276 | && !in_array($response['status'], ['rejected', 'invalid']) | 277 | && !in_array($response['status'], ['rejected', 'invalid']) |
| 277 | ) { | 278 | ) { | ... | ... |
-
Please register or sign in to post a comment