Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#46824 closed defect (bug) (fixed)

Unnecessary use of swappable arguments

Reported by: tobifjellner's profile tobifjellner Owned by: desrosj's profile desrosj
Milestone: 5.2 Priority: normal
Severity: normal Version: 5.2
Component: Administration Keywords: good-first-bug has-patch
Focuses: Cc:


In current trunk (5.2) /wp-admin/includes/file.php contains a couple of string with numbered arguments, but since there is only one placeable, it doesn't need to be numbered.

The authenticity of %1$s could not be verified as signature verification is unavailable on this system.

The authenticity of %1$s could not be verified as no signature was found.

Attachments (3)

46824.patch (1.6 KB) - added by thrijith 5 years ago.
46824.1.patch (1.3 KB) - added by thrijith 5 years ago.
46824.2.patch (1.3 KB) - added by thrijith 5 years ago.
Refresh patch

Download all attachments as: .zip

Change History (9)

5 years ago

5 years ago

#1 @subrataemfluence
5 years ago

  • Keywords needs-refresh added

@thrijith please correct the following line of code:

$home = parse_url( get_option( 'swp-admin/includes/file.php iteurl' ) ); in the patch for src/wp-includes/class-wp-http-proxy.php

Version 0, edited 5 years ago by subrataemfluence (next)

#2 @thrijith
5 years ago

  • Keywords has-patch added; needs-refresh removed

@subrataemfluence I have corrected that in the second patch, please check.

#3 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 5.2
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

Hi @thrijith, thanks for the patch!

Just to clarify, <span class="code">%s</span> should not be added to the translatable string. We've been removing unnecessary HTML tags from strings for a while in some previous tickets.

The first patch looks good, excerpt for the wp-includes/class-wp-http-proxy.php change.

The translator comments above the strings should also be updated to replace 1: with %s:.

5 years ago

Refresh patch

#4 @thrijith
5 years ago

Hi @SergeyBiryukov,

Thanks for the review. I have updated the patch.
Please let me know if something else needs to be changed in this.

#5 @desrosj
5 years ago

  • Owner changed from SergeyBiryukov to desrosj

#6 @desrosj
5 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 45167:

Administration: Remove unnecessary numbered placeholders.

Props: tobifjellner, thrijith.
Fixes #46824.

Note: See TracTickets for help on using tickets.