Index: trunk/phase3/includes/MessageCache.php |
— | — | @@ -501,10 +501,9 @@ |
502 | 502 | function get( $key, $useDB = true, $langcode = true, $isFullKey = false ) { |
503 | 503 | global $wgContLanguageCode, $wgContLang; |
504 | 504 | |
505 | | - if ( !is_string( $key ) ) { |
506 | | - throw new MWException( __METHOD__.': Invalid message key of type ' . gettype( $key ) ); |
507 | | - } elseif ( $key === '' ) { |
508 | | - throw new MWException( __METHOD__.': Invaild message key: empty string' ); |
| 505 | + if ( strval( $key ) === '' ) { |
| 506 | + # Shortcut: the empty key is always missing |
| 507 | + return '<>'; |
509 | 508 | } |
510 | 509 | |
511 | 510 | $lang = wfGetLangObj( $langcode ); |