Merge "Avoid variable reuse under same name"

This commit is contained in:
jenkins-bot 2018-08-12 22:21:18 +00:00 committed by Gerrit Code Review
commit 56de6c706c

View file

@ -224,19 +224,19 @@ class TemplateStylesHooks {
$content = $rev ? $rev->getContent() : null; $content = $rev ? $rev->getContent() : null;
if ( !$content ) { if ( !$content ) {
$title = $title->getPrefixedText(); $titleText = $title->getPrefixedText();
return self::formatTagError( $parser, [ return self::formatTagError( $parser, [
'templatestyles-bad-src-missing', 'templatestyles-bad-src-missing',
$title, $titleText,
wfEscapeWikiText( $title ) wfEscapeWikiText( $titleText )
] ); ] );
} }
if ( !$content instanceof TemplateStylesContent ) { if ( !$content instanceof TemplateStylesContent ) {
$title = $title->getPrefixedText(); $titleText = $title->getPrefixedText();
return self::formatTagError( $parser, [ return self::formatTagError( $parser, [
'templatestyles-bad-src', 'templatestyles-bad-src',
$title, $titleText,
wfEscapeWikiText( $title ), wfEscapeWikiText( $titleText ),
ContentHandler::getLocalizedName( $content->getModel() ) ContentHandler::getLocalizedName( $content->getModel() )
] ); ] );
} }