mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-30 19:14:22 +00:00
Suppress phan false positives in LuaSandboxEngine::formatLimitData()
Most of this function deals with values for the single scribunto-limitreport-profile key, where $value is an array of strings. Phan's security check plugin was getting confused because *in general* the $value passed to a ParserLimitReportFormat hook can be almost anything. Change-Id: I0ef5ef71f00a92bd5db0df340725c88595fcb0c6
This commit is contained in:
parent
664c866980
commit
0cd8904842
|
@ -127,7 +127,10 @@ class Scribunto_LuaSandboxEngine extends Scribunto_LuaEngine {
|
|||
}
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @suppress SecurityCheck-DoubleEscaped phan false positive
|
||||
*/
|
||||
public function formatLimitData( $key, &$value, &$report, $isHTML, $localize ) {
|
||||
global $wgLang;
|
||||
$lang = $localize ? $wgLang : Language::factory( 'en' );
|
||||
|
@ -146,6 +149,7 @@ class Scribunto_LuaSandboxEngine extends Scribunto_LuaEngine {
|
|||
if ( $key !== 'scribunto-limitreport-profile' ) {
|
||||
return true;
|
||||
}
|
||||
'@phan-var string[] $value';
|
||||
|
||||
$keyMsg = wfMessage( 'scribunto-limitreport-profile' );
|
||||
$msMsg = wfMessage( 'scribunto-limitreport-profile-ms' );
|
||||
|
|
Loading…
Reference in a new issue