I get this error, when I try to sent a mail via mimemail rule action

Deprecated function: Function set_magic_quotes_runtime() is deprecated in PHPMailer->EncodeFile() (Line 1474 of sites/all/modules/contrib/smtp/smtp.phpmailer.inc).
Deprecated function: Function set_magic_quotes_runtime() is deprecated in PHPMailer->EncodeFile() (Line 1479 of sites/all/modules/contrib/smtp/smtp.phpmailer.inc).
CommentFileSizeAuthor
#2 smtp.1807390.2.patch1.09 KBtobiasb
#1 smtp.1807390.1.patch699 bytestobiasb

Comments

tobiasb’s picture

Status: Active » Needs review
StatusFileSize
new699 bytes

The patch does the same like it does in a newer version of phpmailer https://github.com/Synchro/PHPMailer/blob/master/class.phpmailer.php#L1643

tobiasb’s picture

StatusFileSize
new1.09 KB

Ok now it does the same ;-)

josesanmartin’s picture

Status: Needs review » Fixed

Tested and commited to master!

Thanks tobiasb!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

u_tiwari’s picture

Issue summary: View changes

Hi , phpcs still register this error and might possibly lead to undefined function errors in some php versions.
Is there any permanent fix for this or can this be addressed.

lisa.rae’s picture

@u_tiwari -- PHPCS is a static code scanner. If you look at the logic in the patch, you'll see that the code block that is causing PHPCS to flag this as a coding error has logic to skip the block if the version of PHP running the site is greater than version 6, which means that these lines of code will be bypassed if you are running PHP version 7+.

With that said, Drupal is no longer supporting PHP version 5, so theoretically this can be removed; however I am also aware that there are sites still running on PHP 5.6 so the current logic should handle any execution issues on PHP 7+