r110492 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110491‎ | r110492 | r110493 >
Date:15:53, 1 February 2012
Author:amire80
Status:resolved (Comments)
Tags:core 
Comment:
Fixes r110484.
Modified paths:
  • /trunk/phase3/languages/classes/LanguageHe.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/classes/LanguageHe.php
@@ -59,9 +59,9 @@
6060 if ( !count( $forms ) ) { return ''; }
6161 $forms = $this->preConvertPlural( $forms, 3 );
6262
63 - if ( $count === '1' ) {
 63+ if ( $count === 1 ) {
6464 return $forms[0]; // Singular
65 - } elseif ( $count === '2' ) {
 65+ } elseif ( $count === 2 ) {
6666 return $forms[2]; // Dual or plural if dual is not provided (filled in preConvertPlural)
6767 } else {
6868 return $forms[1]; // Plural

Follow-up revisions

RevisionCommit summaryAuthorDate
r110572== comparison for all languages, instead of ===, according to Niklas' suggest...amire8014:42, 2 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r110484Integer comparison in Hebrew plural forms.amire8015:36, 1 February 2012

Comments

#Comment by Nikerabbit (talk | contribs)   10:12, 2 February 2012

Although I usually advocate the usage of ===, in this method the numbers may come either as strings or integers, so $count == 1 is the safest way to write it.

#Comment by Amire80 (talk | contribs)   14:44, 2 February 2012

Should be addressed in r110572.

Status & tagging log