From: Siebrand Mazeland Date: Fri, 27 Dec 2013 16:26:06 +0000 (+0100) Subject: Type cast formatted time X-Git-Tag: 1.31.0-rc.0~17476^2 X-Git-Url: https://git.cyclocoop.org/%20%27.%28%24debut%20%20%20%24par_page%29.%27?a=commitdiff_plain;h=dc8ea9f82fc84094aa89ddc8cd488a7af2b23103;p=lhc%2Fweb%2Fwiklou.git Type cast formatted time Static code analyser warned for possible incorrect string concatenation operator. Now it's clear what type we're dealing with. Change-Id: Ic9f19479379ec2c6f4cb087ade44235fb110318c --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 9be75ae943..dea98950af 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -2941,7 +2941,7 @@ class Parser { $value = ( wfUrlencode( $this->mTitle->getSubjectNsText() ) ); break; case 'currentdayname': - $value = $pageLang->getWeekdayName( MWTimestamp::getInstance( $ts )->format( 'w' ) + 1 ); + $value = $pageLang->getWeekdayName( (int)MWTimestamp::getInstance( $ts )->format( 'w' ) + 1 ); break; case 'currentyear': $value = $pageLang->formatNum( MWTimestamp::getInstance( $ts )->format( 'Y' ), true ); @@ -2961,7 +2961,7 @@ class Parser { $value = $pageLang->formatNum( MWTimestamp::getInstance( $ts )->format( 'w' ) ); break; case 'localdayname': - $value = $pageLang->getWeekdayName( MWTimestamp::getLocalInstance( $ts )->format( 'w' ) + 1 ); + $value = $pageLang->getWeekdayName( (int)MWTimestamp::getLocalInstance( $ts )->format( 'w' ) + 1 ); break; case 'localyear': $value = $pageLang->formatNum( MWTimestamp::getLocalInstance( $ts )->format( 'Y' ), true );