[wp-trac] [WordPress Trac] #63642: Passing stringy number to _n() can result in a plural when singular is intended

WordPress Trac noreply at wordpress.org
Tue Jul 1 05:38:48 UTC 2025


#63642: Passing stringy number to _n() can result in a plural when singular is
intended
--------------------------------------+------------------------------
 Reporter:  dd32                      |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  I18N                      |     Version:  6.5
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------

Comment (by pmbaldha):

 == Reproduction Report
 === Description
 This report validates whether the issue can be reproduced.

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.28
 - Server: nginx/1.27.5
 - Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
 - Browser: Chrome 137.0.0.0
 - OS: Windows 10/11
 - Theme: Twenty Twenty-Five 1.2
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.0

 === Actual Results
 1.  ❌ Error condition doesn't occur (reproduced).
 When I run the code _n( 'Singular', 'Plural', '1' ), I am getting Singular
 as expected so I can't replicate the error.

 === Additional Notes
 Please refer to the Screenshot: https://prnt.sc/QdAl5CIcoZjg

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63642#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list