Remove code which contains deprecated function set_magic_quotes_runtime and ini directive 'magic_quotes_runtime'.
Version compare also corresponds to php 5.3 which is already past end of life. Can the part of the code be safely removed to do away with unwanted errors.
web/sites/all/modules/contrib/smtp/smtp.phpmailer.inc
-----------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------
1448 | ERROR | Function set_magic_quotes_runtime() is deprecated since PHP 5.3 and removed since
| | PHP 7.0
1451 | ERROR | INI directive 'magic_quotes_runtime' is deprecated since PHP 5.3 and removed since
| | PHP 5.4
1458 | ERROR | Function set_magic_quotes_runtime() is deprecated since PHP 5.3 and removed since
| | PHP 7.0
1461 | ERROR | INI directive 'magic_quotes_runtime' is deprecated since PHP 5.3 and removed since
| | PHP 5.4
-----------------------------------------------------------------------------------------------------
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | remove_deprecated_code_3009090_2.patch | 1.19 KB | u_tiwari |
Comments
Comment #2
u_tiwari commentedPlease test this patch if as i found that control does not go inside the code which i have removed as get_magic_quotes_runtime() always returns false as of php 5.4
Comment #3
chris matthews commentedComment #4
solideogloria commentedBefore this is committed, you need to make sure to set
php = 5.4in the smtp.info file, since that would be the new minimum PHP version supported by this module.Comment #5
solideogloria commentedComment #6
Dru18 commentedThe source code itself is weird.
Both are deprecated since 5.3.0; why it tries to bring the ini_set('mgic_quotes_runtime..) back?
I feel that else statement should go away.
Comment #7
solideogloria commented@Dru18, you should take another look at the patch file. That's literally what the patch is for: to remove that code.
Comment #8
u_tiwari commentedOk, is that change already covered in any other issue or should we add this via this issue and patch itself?
Comment #9
mohangathala commentedComment #10
mohangathala commentedThis patch #2 works for me. Screenshot attached for the same.
Comment #11
ravikk-drupal commentedThis patch #2 works for me. Screenshot attached for the same.
Comment #12
ravikk-drupal commentedThis patch #2 works for me. Screenshot attached for the same.
Comment #13
ravikk-drupal commentedComment #14
damienmckennaComment #15
krzysztof domański+1
Comment #16
alina.basarabeanu commentedPatch #2 works on Drupal core 7.91 and SMTP 7.x-1.7+21-dev version
Is there any chance to get a new stable release for Drupal 7?
Comment #17
alina.basarabeanu commentedSame as on the 3050130 issue, SMTP 7.x-1.8 release is out but this issue was not included.
Comment #18
damienmckennaComment #19
joseph.olstad@japerry or any other maintainer for this project, please add PHP 8.0, PHP 8.1 and PHP 8.2 tests here:
https://www.drupal.org/node/35189/qa
Comment #20
joseph.olstadpatch 2 passes all automated tests with all major php versions including PHP 8.2
concensus is do it.
Pushing in now
Comment #22
joseph.olstad