Fomafix has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/377758 )
Change subject: Remove language as string for DateFormatter::getInstance
......................................................................
Remove language as string for DateFormatter::getInstance
Change-Id: I677ab561d67b63f0c86f65fadf9319e41444a22a
---
M includes/parser/DateFormatter.php
1 file changed, 3 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/58/377758/1
diff --git a/includes/parser/DateFormatter.php
b/includes/parser/DateFormatter.php
index 097012d..8ef060f 100644
--- a/includes/parser/DateFormatter.php
+++ b/includes/parser/DateFormatter.php
@@ -126,17 +126,14 @@
/**
* Get a DateFormatter object
*
- * @param Language|null $lang In which language to format the date
+ * @param Language $lang In which language to format the date
* Defaults to the site content language
* @return DateFormatter
*/
- public static function getInstance( $lang = null ) {
+ public static function getInstance( Language $lang = null ) {
global $wgContLang, $wgMainCacheType;
- if ( is_string( $lang ) ) {
- wfDeprecated( __METHOD__ . ' with type string for
$lang', '1.30' );
- }
- $lang = $lang ? wfGetLangObj( $lang ) : $wgContLang;
+ $lang = $lang ?: $wgContLang;
$cache = ObjectCache::getLocalServerInstance( $wgMainCacheType
);
static $dateFormatter = false;
--
To view, visit https://gerrit.wikimedia.org/r/377758
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I677ab561d67b63f0c86f65fadf9319e41444a22a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Fomafix <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits