r46249 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46248‎ | r46249 | r46250 >
Date:10:48, 26 January 2009
Author:nikerabbit
Status:ok (Comments)
Tags:
Comment:
* Shortcut return if no params given to avoid notices
Modified paths:
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/Language.php
@@ -2073,6 +2073,7 @@
20742074 * These details may be overriden per language.
20752075 */
20762076 function gender( $gender, $forms ) {
 2077+ if ( !count($forms) ) { return ''; }
20772078 $forms = $this->preConvertPlural( $forms, 2 );
20782079 if ( $gender === 'male' ) return $forms[0];
20792080 if ( $gender === 'female' ) return $forms[1];

Comments

#Comment by Siebrand (talk | contribs)   00:01, 27 January 2009

Fix for notices on r46247

Status & tagging log