Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.10] [4.0] Fix wrong number of parameters for sprintf #35148

Merged

Conversation

richard67
Copy link
Member

@richard67 richard67 commented Aug 16, 2021

Pull Request for Issue #35122 .

Summary of Changes

This pull request (PR) fixes the wrong number of parameters in the 1st and the 3rd call to sprintf reported with issue #35122 .

The 2nd call reported in the issue is J4 only and has been already fixed with this commit in the 4.0-dev branch: 76875db

In addition this PR fixes the same mistake for the call to \JText::sprintf just above the 1st reported issue. The language sting JLIB_MAIL_INVALID_EMAIL_SENDER uses nearly the same text with the same two %s as the reported issue in both 3.10-dev and 4.0-dev.

I decided not to fix that language string JLIB_MAIL_INVALID_EMAIL_SENDER in order not to cause translation works.

Not sure if this PR fixes these issues in the best way, but it should work.

All fixes in this PR here need to be merged up into 4.0-dev after having been merged into 3.10-dev.

Testing Instructions

Code review.

Actual result BEFORE applying this Pull Request

Wrong number of parameters in calls to sprintf and \JText::sprintf.

Expected result AFTER applying this Pull Request

Right number of parameters in calls to sprintf and \JText::sprintf.

Documentation Changes Required

None.

@richard67 richard67 changed the title [3.10] [4.0] Fix wrong number of parameters for sprintf [3.10] [4.0] [WiP] Fix wrong number of parameters for sprintf Aug 17, 2021
@richard67 richard67 marked this pull request as draft August 17, 2021 11:59
Co-authored-by: Ricardo <33345530+ricardo1709@users.noreply.github.com>
@richard67 richard67 changed the title [3.10] [4.0] [WiP] Fix wrong number of parameters for sprintf [3.10] [4.0] Fix wrong number of parameters for sprintf Aug 21, 2021
@richard67 richard67 marked this pull request as ready for review August 21, 2021 09:31
@richard67
Copy link
Member Author

@ricardo1709 Done. Ready for tests/reviews.

@richard67
Copy link
Member Author

@ricardo1709 Unfortunately approval is nice but doesn't count like a test. Could you mark it in the issue tracker, too? Thanks in advance.

@ricardo1709
Copy link
Contributor

I have tested this item ✅ successfully on 0278808


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

@richard67
Copy link
Member Author

@ricardo1709 Thanks.

@joomla-cms-bot joomla-cms-bot added the Language Change This is for Translators label Aug 21, 2021
@richard67
Copy link
Member Author

@ricardo1709 Could you test again? Thanks in advance.

@ricardo1709
Copy link
Contributor

I have tested this item ✅ successfully on 8bfe157


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

Copy link
Contributor

@zero-24 zero-24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging thanks

@zero-24 zero-24 merged commit a0db31b into joomla:3.10-dev Aug 21, 2021
@richard67 richard67 deleted the 3.10-dev-fix-sprintf-wrong-number-of-params branch August 21, 2021 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants