?
avatar artur-stepien
artur-stepien
19 Mar 2020

Steps to reproduce the issue

Use any extension that sends attachments using Joomla! mailer. Sending any attachment via Joomla mailer (that uses phpmailer) in PHP 7.4+ will cause a deprecated warning as follows:

Deprecated: Function get_magic_quotes_runtime() is deprecated in /var/www/libraries/vendor/phpmailer/phpmailer/class.phpmailer.php on line 2714

Or just look into /libraries/vendor/phpmailer/phpmailer/class.phpmailer.php file on line 2714 and check get_magic_quotes_runtime() documentation in https://www.php.net/manual/en/function.get-magic-quotes-runtime.php. This function is deprecated starting from 7.4.0

Expected result

No warning

Actual result

Deprecated: Function get_magic_quotes_runtime() is deprecated in /var/www/libraries/vendor/phpmailer/phpmailer/class.phpmailer.php on line 2714

System information (as much as possible)

PHP 7.4.3
Joomla 3.9.16

Additional comments

avatar artur-stepien artur-stepien - open - 19 Mar 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 19 Mar 2020
avatar brianteeman brianteeman - change - 19 Mar 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-03-19 10:33:57
Closed_By brianteeman
avatar brianteeman
brianteeman - comment - 19 Mar 2020

Thanks for reporting this but this is a vendor supplied library and you should report it directly to them

https://github.com/PHPMailer/PHPMailer/

avatar brianteeman brianteeman - close - 19 Mar 2020
avatar artur-stepien
artur-stepien - comment - 19 Mar 2020

Its not them who put this version in Joomla 3.9. That's first thing. Second, they already have a 6.x that removed the deprecated code. Joomla! 4.x also uses PHPMailer 6.x and until PHPMailer is updated in Joomla 3.9.x it will cause deprecated warnings in some of extensions when running on PHP 7.4.

avatar mbabker
mbabker - comment - 19 Mar 2020

It is not Joomla’s responsibility to fork and patch third party libraries that it uses, therefore the instruction to report the issue upstream is valid.

The library cannot be updated because of the raised PHP minimum not matching Joomla’s.

A deprecation notice will not break your site until the deprecated functionality is removed. It can be safely ignored.

avatar artur-stepien
artur-stepien - comment - 19 Mar 2020

@mbabker Where did I wrote anything about patching external libraries? Point me to that sentence. And please, read the comment above, they did patch it in next release, there is nothing to report. The issue exists and ignoring the deprecated warning is not the solution is exactly the lack of one. If I make a PR to PHPMailer and they will release another version of 5.x will you update the library in Joomla?

avatar gerryfrancis
gerryfrancis - comment - 19 Mar 2020

Technical requirements for Joomla! are PHP 7.3+, that would include PHP 7.4. Any components included in current versions of Joomla! should support that, otherwise the specs must be defined more precisely.

avatar artur-stepien
artur-stepien - comment - 19 Mar 2020

PHPMailer just released 5.2.28 that should fix the issue. So could you kindly update the version Joomla! uses? @mbabker @brianteeman

avatar brianteeman
brianteeman - comment - 19 Mar 2020

@gerryfrancis that is the requirements for joomla 4 not 3

@artur-stepien feel free to submit a pull request

avatar infograf768
infograf768 - comment - 19 Mar 2020

Is 3.9.x not supposed to work with php 7.4?

avatar brianteeman
brianteeman - comment - 19 Mar 2020

yes and it does

avatar infograf768
infograf768 - comment - 19 Mar 2020

Therefore it makes sense to update phpmailer.
Reopening Issue.

avatar infograf768 infograf768 - change - 19 Mar 2020
Status Closed New
Closed_Date 2020-03-19 10:33:57
Closed_By brianteeman
avatar infograf768 infograf768 - reopen - 19 Mar 2020
avatar infograf768
infograf768 - comment - 19 Mar 2020

Except evidently if it would break for lower php versions...

avatar artur-stepien
artur-stepien - comment - 19 Mar 2020

@infograf768 No it would not, there is a new version of PHPMailer with just fixing the deprecated issue reported above. Its still from 5.x

avatar wilsonge
wilsonge - comment - 19 Mar 2020

PHPMailer just released 5.2.28 that should fix the issue. So could you kindly update the version Joomla! uses?

Yes we can - here's a pull request #28398

Thankyou for reporting it :)

avatar wilsonge wilsonge - change - 19 Mar 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-03-19 16:04:35
Closed_By wilsonge
avatar wilsonge wilsonge - close - 19 Mar 2020

Add a Comment

Login with GitHub to post a comment