WordPress.org

Make WordPress Core

#46824 closed defect (bug) (fixed)

Unnecessary use of swappable arguments

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

Description

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 16 months ago.
46824.1.patch (1.3 KB) - added by thrijith 16 months ago.
46824.2.patch (1.3 KB) - added by thrijith 16 months ago.
Refresh patch

Download all attachments as: .zip

Change History (9)

@thrijith
16 months ago

@thrijith
16 months ago

#1 @subrataemfluence
16 months 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 you provided for src/wp-includes/class-wp-http-proxy.php

Last edited 16 months ago by subrataemfluence (previous) (diff)

#2 @thrijith
16 months ago

  • Keywords has-patch added; needs-refresh removed

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

#3 @SergeyBiryukov
16 months 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:.

@thrijith
16 months ago

Refresh patch

#4 @thrijith
16 months 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
16 months ago

  • Owner changed from SergeyBiryukov to desrosj

#6 @desrosj
16 months 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.