The PHPCompatibility sniffer for PHPCS flags several issues related to "Function set_magic_quotes_runtime()"
$ phpcs --standard=PHPCompatibility --runtime-set testVersion 7.1 contrib/smtp
FILE: .../docroot/modules/contrib/smtp/src/PHPMailer/PHPMailer.php
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
1474 | ERROR | Function set_magic_quotes_runtime() is deprecated
| | since PHP 5.3 and removed since PHP 7.0
1477 | ERROR | INI directive 'magic_quotes_runtime' is deprecated
| | since PHP 5.3 and removed since PHP 5.4
1484 | ERROR | Function set_magic_quotes_runtime() is deprecated
| | since PHP 5.3 and removed since PHP 7.0
1487 | ERROR | INI directive 'magic_quotes_runtime' is deprecated
| | since PHP 5.3 and removed since PHP 5.4
----------------------------------------------------------------------
Comment | File | Size | Author |
---|---|---|---|
#15 | smtp-7.x-1.7-php72.patch | 1.22 KB | sam.spinoy@gmail.com |
Comments
Comment #2
click2tman CreditAttribution: click2tman commentedComment #3
webservant316 CreditAttribution: webservant316 commentedThis is also an issue for smtp 7.x. Do we need a separate issue for that?
Also is this issue breaking? phpsnif reports an error and not a warning. Can we move to PHP71 and ignore this error?
Comment #4
estoyausenteI'm not sure that it would be a real problem because the code check if the PHP version is less than 5.3 before use the magic quotes:
Furthermore, PhpMailer is an external library and I'm not sure if we have to modify...
Comment #5
webservant316 CreditAttribution: webservant316 commentedyes, sorry for not looking more closely. agreed this is not a problem.
Comment #6
estoyausenteComment #7
gbisht CreditAttribution: gbisht at South China Morning Post commentedAbove solution is good to removed the following error
But in the else condition it uses
ini_set('magic_quotes_runtime', 0);
which is also throws errorSo do we have any solution for this.
Comment #8
u_tiwari CreditAttribution: u_tiwari commentedSo i noticed this issue still exists and these errors get logged . Is it established that these errors don't have any impact on functionality of the module, if yes then can the part of the code be removed which causes these errors. Or is there any patch for this ?
Comment #9
Chris Matthews CreditAttribution: Chris Matthews as a volunteer and at City of Oaks Design commentedComment #10
wundo CreditAttribution: wundo at Chuva Inc. for Galoa Science commentedComment #12
wundo CreditAttribution: wundo at Chuva Inc. for Galoa Science commentedComment #13
wundo CreditAttribution: wundo at Chuva Inc. for Galoa Science commentedComment #15
sam.spinoy@gmail.com CreditAttribution: sam.spinoy@gmail.com at Adapt commentedHere's a patch for D7 that removes the offending code