I noticed this, when maillog debug is enabled and running the password reset email, arrays can be dumped to the top of the screen in the body content, rather that in the maillog entry, this is because of a print_r statement when generating a log record. I've fixed this with the following patch on line 383 of sendgrid.mail.inc:
if (!empty($filters = $sendgrid_message->smtpapi->getFilters())) {
$record->body .= 'Filters:' . "\n";
foreach ($filters as $item) {
- $record->body .= print_r($item) . "\n";
+ $record->body .= print_r($item, TRUE) . "\n";
}
$record->body .= $divider;
$record->body .= $divider;
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | sendgrid_integration--2984307.patch | 806 bytes | leslie.cordell |
Comments
Comment #2
leslie.cordell commentedComment #3
perignon commentedAwesome! Thanks for the patch.
Comment #4
perignon commentedPatch is incorrectly generated. You created this patch within a site instead of the module repo.
Comment #6
perignon commentedI fixed the issue without the patch since it was small.