WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 months ago

#48446 closed defect (bug) (worksforme)

Fix typo in compatibility message in update core

Reported by: man4toman Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description

I'm not sure about this but I think there is extra % for 100%.

Example:
Compatibility with WordPress %s: 100%% (according to its author)

https://build.trac.wordpress.org/browser/trunk/wp-admin/update-core.php?marks=351#L351

https://build.trac.wordpress.org/browser/trunk/wp-admin/update-core.php?marks=342#L342

Change History (1)

#1 @swissspidy
4 months ago

  • Component changed from General to Upgrade/Install
  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Thanks for your report, but the double %% is correct.

The string is passed through sprintf(), where % has a special meaning as a placeholder. When needing to use an actual percentage sign and not a placeholder, you need to use two to escape it.

See https://www.php.net/manual/en/function.sprintf.php

Note: See TracTickets for help on using tickets.