Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 67836

Minor bug on version Version 1.5.6

$
0
0

Replies: 1

Hi,

I found bug for version 1.5.6, as follow:

Error Severity: 8, Error Message: Undefined variable: content_type, Error File: wp-content/plugins/mailgun/includes/wp-mail.php, Error Line: 284″

The fix it so simple, you just need to move the code block

// Allow external content type filter to function normally
if (has_filter(‘wp_mail_content_type’)) {
$content_type = apply_filters(
‘wp_mail_content_type’,
$content_type
);
}

right under block

// If we are not given a Content-Type from the supplied headers, use
// text/html and *attempt* to strip tags and provide a text/plain
// version.
if (!isset($content_type)) {
// Try to figure out the content type with mime_content_type.
$tmppath = tempnam(sys_get_temp_dir(), ‘mg’);
$tmp = fopen($tmppath, ‘w+’);

fwrite($tmp, $message);
fclose($tmp);

// Get mime type with mime_content_type
$content_type = get_mime_content_type($tmppath, ‘text/plain’);

// Remove the tmpfile
unlink($tmppath);
}


Viewing all articles
Browse latest Browse all 67836

Trending Articles