From: Antoine Musso Date: Sun, 7 Jan 2007 06:33:21 +0000 (+0000) Subject: Fix when nothing is passed to listToText (eg: no author) X-Git-Tag: 1.31.0-rc.0~54614 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=a97f24626c0eb8c836f4169c7e4c7951b1cf4e01;p=lhc%2Fweb%2Fwiklou.git Fix when nothing is passed to listToText (eg: no author) --- diff --git a/includes/SpecialVersion.php b/includes/SpecialVersion.php index 9cdf757a47..e22914b816 100644 --- a/includes/SpecialVersion.php +++ b/includes/SpecialVersion.php @@ -238,7 +238,9 @@ class SpecialVersion { if ( $cnt == 1 ) // Enforce always returning a string return (string)$this->arrayToString( $list[0] ); - else { + elseif ( $cnt == 0 ) { + return ''; + else { $t = array_slice( $list, 0, $cnt - 1 ); $one = array_map( array( &$this, 'arrayToString' ), $t ); $two = $this->arrayToString( $list[$cnt - 1] );