From dc8ea9f82fc84094aa89ddc8cd488a7af2b23103 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Fri, 27 Dec 2013 17:26:06 +0100 Subject: [PATCH] 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 --- includes/parser/Parser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); -- 2.20.1