r22012 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22011‎ | r22012 | r22013 >
Date:21:20, 8 May 2007
Author:brion
Status:old
Tags:
Comment:
* (bug 9807) Don't return invalid empty HTML list from <references/> if no <ref>s present
Modified paths:
  • /trunk/extensions/Cite/Cite.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Cite/Cite.php
@@ -343,8 +343,10 @@
344344 * @return string XHTML ready for output
345345 */
346346 function referencesFormat() {
 347+ if ( count( $this->mRefs ) == 0 )
 348+ return '';
 349+
347350 $ent = array();
348 -
349351 foreach ( $this->mRefs as $k => $v )
350352 $ent[] = $this->referencesFormatEntry( $k, $v );
351353