? Pending

User tests: Successful: Unsuccessful:

avatar brandtOSS
brandtOSS
20 Mar 2017

Summary of Changes

The JMail method addAttachment accepts the parameter $disposition however does not pass it to the parent class PHPMailer's method of the same name.
Thus the change is to pass the paremeter $disposition to the parent class.

Testing Instructions

None, does not change existing behaviour (ony adds functionality that got lost).

Documentation Changes Required

None

Pull Request for Issue #14818 .

avatar brandtOSS brandtOSS - open - 20 Mar 2017
avatar brandtOSS brandtOSS - change - 20 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Mar 2017
Category Libraries
avatar brandtOSS brandtOSS - change - 20 Mar 2017
The description was changed
avatar brandtOSS brandtOSS - edited - 20 Mar 2017
avatar laoneo
laoneo - comment - 22 Mar 2017

only adds functionality that got lost

Then we need to be able to test that added new functionality. I guess without some testing it is difficult to say if it should get merged or not.

avatar mbabker
mbabker - comment - 22 Mar 2017

Read the method declarations and the calls to the parent method. That makes it very clear that we aren't passing the data up the chain.

JMail is a massive trainwreck because it completely breaks the inherited API.

avatar brandtOSS
brandtOSS - comment - 22 Mar 2017

@mbabker Exactly!

@laoneo
The fact is that the JMail method signature is the same as the PHPMailer parent. The small value that JMail's method add, is, that several attachments can be added by passing an array of filenames/filepaths.

What JMail screws up is that the last parameter $disposition does not get passed up the chain.
As such this parameter is always the default value of PHPMailer ('attachment').

Thus JMail effectively removes functionality and flexibility that PHPMailer offers.

Then we need to be able to test that added new functionality. I guess without some testing it is difficult to say if it should get merged or not.

I don't consider it new functionality as it is / was there in PHPMailer all the time.
The reason I don't see tests as necessary is, that no Joomla code is using that last parameter.

avatar laoneo
laoneo - comment - 23 Mar 2017

I absolutely agree on your points. But as soon as a change has a different behavior than before the patch I suggest to write up some testing instructions. That's my opinion.

avatar mbabker mbabker - change - 23 Mar 2017
Status Pending Ready to Commit
avatar mbabker
mbabker - comment - 23 Mar 2017

Pre-patch - Argument of the method is fully ignored

Post-patch - Argument of the method is properly passed forward through the call chain

Simple review - RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14819.

avatar wilsonge wilsonge - change - 25 Mar 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-03-25 21:27:06
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 25 Mar 2017
avatar wilsonge wilsonge - merge - 25 Mar 2017

Add a Comment

Login with GitHub to post a comment