* (bug 48294) API: Fix chunk upload async mode.
* (bug 46749) Broken files tracking category removed from pages if an image
with that name is uploaded.
+* (bug 14176) System messages that are empty were previously incorrectly treated
+ as non-existent, causing a fallback to the default. This stopped users from
+ overriding system messages to make them blank.
=== API changes in 1.22 ===
* (bug 46626) xmldoublequote parameter was removed. Because of a bug, the
*
* @param string $title Message cache key with initial uppercase letter.
* @param string $code Code denoting the language to try.
- * @return string|bool False on failure
+ * @return string|bool The message, or false iff it does not exist or on error
*/
function getMsgFromNamespace( $title, $code ) {
$this->load( $code );
if ( isset( $this->mCache[$code][$title] ) ) {
$entry = $this->mCache[$code][$title];
if ( substr( $entry, 0, 1 ) === ' ' ) {
- return substr( $entry, 1 );
+ // The message exists, so make sure a string
+ // is returned.
+ return (string)substr( $entry, 1 );
} elseif ( $entry === '!NONEXISTENT' ) {
return false;
} elseif ( $entry === '!TOO BIG' ) {
if ( $entry ) {
if ( substr( $entry, 0, 1 ) === ' ' ) {
$this->mCache[$code][$title] = $entry;
- return substr( $entry, 1 );
+ // The message exists, so make sure a string
+ // is returned.
+ return (string)substr( $entry, 1 );
} elseif ( $entry === '!NONEXISTENT' ) {
$this->mCache[$code][$title] = '!NONEXISTENT';
return false;