From 4421f598eae1e14fda0f4742cf1798ff1ab5514d Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 1 Mar 2013 08:22:46 +0100 Subject: [PATCH] Correct documentation for wfPickRandom()'s return types Also make LoadBalancer::pickRandom()'s one consistent. Change-Id: Ib80827ef20b32fecb799f327545b1232272076d2 --- includes/GlobalFunctions.php | 2 +- includes/db/LoadBalancer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ); -- 2.20.1