[wp-trac] [WordPress Trac] #55194: wp_rand( 0, 0) result in random integer

WordPress Trac noreply at wordpress.org
Mon Jun 6 22:48:36 UTC 2022


#55194: wp_rand( 0, 0)  result in random integer
-------------------------------------------------+-------------------------
 Reporter:  mlajo                                |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.1
Component:  General                              |     Version:  5.9
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit      |     Focuses:  docs
  needs-dev-note                                 |
-------------------------------------------------+-------------------------
Changes (by audrasjb):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"53473" 53473]:
 {{{
 #!CommitTicketReference repository="" revision="53473"
 General: Ensure `wp_rand()` returns `0` when `$min` and `$max` values are
 equal to `0`.

 This changeset ensures `wp_rand()` returns zero instead of a random number
 when both `$min` and `$max` values are equal to zero.

 Fixes #55194.
 }}}

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


More information about the wp-trac mailing list