r51195 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51194‎ | r51195 | r51196 >
Date:13:21, 30 May 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
* Return empty array instead of null
Modified paths:
  • /trunk/extensions/Translate/MessageGroups.php (modified) (history)
  • /trunk/extensions/Translate/groups/MediaWikiExtensions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/MessageGroups.php
@@ -100,6 +100,7 @@
101101 if ( $reader ) {
102102 return $reader->parseMessages( $this->mangler );
103103 }
 104+ return array();
104105 }
105106
106107 /**
@@ -349,7 +350,7 @@
350351 if ( isset( $cache[$code] ) ) {
351352 return $cache[$code];
352353 } else {
353 - return null;
 354+ return array();
354355 }
355356 }
356357
Index: trunk/extensions/Translate/groups/MediaWikiExtensions.php
@@ -209,7 +209,7 @@
210210 }
211211
212212 public function load( $code ) {
213 - return null; // no-op
 213+ return array(); // no-op
214214 }
215215
216216 public function getMessage( $key, $code ) {

Status & tagging log