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).| Comment | File | Size | Author |
|---|---|---|---|
| #2 | smtp.1807390.2.patch | 1.09 KB | tobiasb |
| #1 | smtp.1807390.1.patch | 699 bytes | tobiasb |
Comments
Comment #1
tobiasbThe patch does the same like it does in a newer version of phpmailer https://github.com/Synchro/PHPMailer/blob/master/class.phpmailer.php#L1643
Comment #2
tobiasbOk now it does the same ;-)
Comment #3
josesanmartin commentedTested and commited to master!
Thanks tobiasb!
Comment #5
u_tiwari commentedHi , 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.
Comment #6
lisa.rae commented@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+