diff options
author | Roan Kattouw <catrope@users.mediawiki.org> | 2011-09-15 11:12:19 +0000 |
---|---|---|
committer | Roan Kattouw <catrope@users.mediawiki.org> | 2011-09-15 11:12:19 +0000 |
commit | 0b9b787acf21fcc789d1702a0801757f3a8a399b (patch) | |
tree | 2ade1b72b0edd59d40ef981a6abcd8f80a0e01dd | |
parent | 833dcc734f52b43855c8b2edcf02fcf608f32505 (diff) | |
download | mediawikicore-0b9b787acf21fcc789d1702a0801757f3a8a399b.tar.gz mediawikicore-0b9b787acf21fcc789d1702a0801757f3a8a399b.zip |
Merge r82361 from 1.17wmf1 to trunk. This shuts up "Non-string key given" exceptions in cases where a numeric key manages to become an integer somehow. This could probably be fixed in a better way but I wouldn't know how.
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/97144
-rw-r--r-- | includes/cache/MessageCache.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 69644792afdf..3f787e907f1b 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -584,6 +584,11 @@ class MessageCache { function get( $key, $useDB = true, $langcode = true, $isFullKey = false ) { global $wgLanguageCode, $wgContLang; + if ( is_int( $key ) ) { + // "Non-string key given" exception sometimes happens for numerical strings that become ints somewhere on their way here + $key = strval( $key ); + } + if ( !is_string( $key ) ) { throw new MWException( 'Non-string key given' ); } |