From: Alexandre Emsenhuber Date: Fri, 1 Mar 2013 07:22:46 +0000 (+0100) Subject: Correct documentation for wfPickRandom()'s return types X-Git-Tag: 1.31.0-rc.0~20526 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=4421f598eae1e14fda0f4742cf1798ff1ab5514d;p=lhc%2Fweb%2Fwiklou.git Correct documentation for wfPickRandom()'s return types Also make LoadBalancer::pickRandom()'s one consistent. Change-Id: Ib80827ef20b32fecb799f327545b1232272076d2 --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 121d6caef2..b49ca65fa3 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -335,7 +335,7 @@ function wfRandomString( $length = 32 ) { * * @param $weights array * - * @return int|string + * @return bool|int|string */ function wfPickRandom( $weights ){ if ( !is_array( $weights ) || count( $weights ) == 0 ) { diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php index d249c27d64..311691db98 100644 --- a/includes/db/LoadBalancer.php +++ b/includes/db/LoadBalancer.php @@ -121,7 +121,7 @@ class LoadBalancer { * * @param $weights array * - * @return int + * @return bool|int|string */ function pickRandom( $weights ) { return wfPickRandom( $weights );