From: Tim Starling Date: Tue, 16 Sep 2008 06:13:31 +0000 (+0000) Subject: Fixed documentation. Don't use empty() to determine if an array has zero length,... X-Git-Tag: 1.31.0-rc.0~45273 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=1c0748933407e5e2d656451c56a4428edad9d373;p=lhc%2Fweb%2Fwiklou.git Fixed documentation. Don't use empty() to determine if an array has zero length, that's not what it does. --- diff --git a/includes/filerepo/RepoGroup.php b/includes/filerepo/RepoGroup.php index 265a8dc905..3f3181370e 100644 --- a/includes/filerepo/RepoGroup.php +++ b/includes/filerepo/RepoGroup.php @@ -177,9 +177,11 @@ class RepoGroup { } /** - * Run a function across all foreign repos. - * @param $callback string Name of method to call - * @param $params array Optional params to pass to the function + * Call a function for each foreign repo, with the repo object as the + * first parameter. + * + * @param $callback callback The function to call + * @param $params array Optional additional parameters to pass to the function */ function forEachForeignRepo( $callback, $params = array() ) { foreach( $this->foreignRepos as $repo ) { @@ -192,11 +194,11 @@ class RepoGroup { } /** - * Does the installation have foreign repos set up? + * Does the installation have any foreign repos set up? * @return bool */ function hasForeignRepos() { - return !empty( $this->foreignRepos ); + return (bool)$this->foreignRepos; } /**