r18911 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r18910‎ | r18911 | r18912 >
Date:06:33, 7 January 2007
Author:hashar
Status:old
Tags:
Comment:
Fix when nothing is passed to listToText (eg: no author)
Modified paths:
  • /trunk/phase3/includes/SpecialVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialVersion.php
@@ -238,7 +238,9 @@
239239 if ( $cnt == 1 )
240240 // Enforce always returning a string
241241 return (string)$this->arrayToString( $list[0] );
242 - else {
 242+ elseif ( $cnt == 0 ) {
 243+ return '';
 244+ else {
243245 $t = array_slice( $list, 0, $cnt - 1 );
244246 $one = array_map( array( &$this, 'arrayToString' ), $t );
245247 $two = $this->arrayToString( $list[$cnt - 1] );