mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateStyles
synced 2024-11-15 03:35:47 +00:00
Merge "Avoid variable reuse under same name"
This commit is contained in:
commit
56de6c706c
|
@ -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() )
|
||||||
] );
|
] );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue