From cad50691948e74faa09084cd2d9135b8b7b0af99 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Fri, 16 Sep 2022 22:39:11 +0000 Subject: [PATCH] Docs: Update `wp_rand` docblock to clarify that it returns a non-negative number. Props hakre, westi, jeremyfelt, neychok, sabernhardt, audrasjb. Fixes #15089. Built from https://develop.svn.wordpress.org/trunk@54190 git-svn-id: http://core.svn.wordpress.org/trunk@53749 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 5ab3eef749..bd338dac4a 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -2612,7 +2612,7 @@ endif; if ( ! function_exists( 'wp_rand' ) ) : /** - * Generates a random number. + * Generates a random non-negative number. * * @since 2.6.2 * @since 4.4.0 Uses PHP7 random_int() or the random_compat library if available. @@ -2624,7 +2624,7 @@ if ( ! function_exists( 'wp_rand' ) ) : * Accepts positive integers or zero. Defaults to 0. * @param int $max Optional. Upper limit for the generated number. * Accepts positive integers. Defaults to 4294967295. - * @return int A random number between min and max. + * @return int A random non-negative number between min and max. */ function wp_rand( $min = null, $max = null ) { global $rnd_value; diff --git a/wp-includes/version.php b/wp-includes/version.php index dee22b0c0e..a37aa76978 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-54189'; +$wp_version = '6.1-alpha-54190'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.