[wp-trac] [WordPress Trac] #15089: wp_rand() can be asked for negative numbers but will never return them

WordPress Trac noreply at wordpress.org
Fri Sep 16 19:51:53 UTC 2022


#15089: wp_rand() can be asked for negative numbers but will never return them
--------------------------------------+-----------------------
 Reporter:  hakre                     |       Owner:  (none)
     Type:  defect (bug)              |      Status:  reopened
 Priority:  lowest                    |   Milestone:  6.1
Component:  General                   |     Version:  2.6
 Severity:  minor                     |  Resolution:
 Keywords:  good-first-bug has-patch  |     Focuses:  docs
--------------------------------------+-----------------------

Comment (by neychok):

 Hey @desrosj, I just refreshed my PR. I closed the last one by mistake
 while syncing my fork.

 I also changed the "A random non-negative number" to "A random positive
 number" from my last PR because at the time of my last PR the function was
 able to return a Zero.

 Thank you for looking into this patch!

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


More information about the wp-trac mailing list