[wp-trac] [WordPress Trac] #41257: translate( null, "domain" ) returns translation of "0" rather than null

WordPress Trac noreply at wordpress.org
Fri Jul 7 08:49:47 UTC 2017


#41257: translate( null, "domain" ) returns translation of "0" rather than null
--------------------------------------+------------------------------
 Reporter:  bobbingwide               |       Owner:
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  I18N                      |     Version:  trunk
 Severity:  minor                     |  Resolution:
 Keywords:  has-unit-tests has-patch  |     Focuses:
--------------------------------------+------------------------------
Changes (by bobbingwide):

 * keywords:   => has-unit-tests has-patch
 * severity:  normal => minor


Comment:

 @MaximeCulea Not sure what you mean by your first sentence.

 I've added a unit test case that demonstrates the unexpected results,
 thereby confirming the current edge case behaviour.
 If the logic in translate() is changed so that it returns different values
 then the test will fail.

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


More information about the wp-trac mailing list