Fix: Convert all array() syntax to []
The signature of the Hook function is not respected. Thus parameters need to be passed by reference explicitly. For syntax validation to pass, this requires mediawiki-codesniffer to 0.6.0 Change-Id: I90b6501000200c1b462407b769113358eb5c762f
This commit is contained in:
parent
6f7bcaf2c6
commit
0d55341ff9
|
@ -230,7 +230,7 @@ class MathHooks {
|
|||
return $renderer->getLastError();
|
||||
}
|
||||
Hooks::run( 'MathFormulaPostRender',
|
||||
[ $parser, $renderer, $renderedMath ] );// Enables indexing of math formula
|
||||
[ $parser, $renderer, &$renderedMath ] );// Enables indexing of math formula
|
||||
|
||||
// Writes cache if rendering was successful
|
||||
$renderer->writeCache();
|
||||
|
|
|
@ -117,7 +117,7 @@ class MathLaTeXML extends MathMathML {
|
|||
if ( $this->isValidMathML( $jsonResult->result ) ) {
|
||||
$this->setMathml( $jsonResult->result );
|
||||
Hooks::run( 'MathRenderingResultRetrieved',
|
||||
[ $this, $jsonResult ] );// Enables debugging of server results
|
||||
[ &$this, &$jsonResult ] );// Enables debugging of server results
|
||||
return true;
|
||||
} else {
|
||||
// Do not print bad mathml. It's probably too verbose and might
|
||||
|
|
|
@ -513,7 +513,7 @@ class MathMathML extends MathRenderer {
|
|||
$this->setMathml( $jsonResult->mml );
|
||||
}
|
||||
Hooks::run( 'MathRenderingResultRetrieved',
|
||||
[ $this, $jsonResult ] ); // Enables debugging of server results
|
||||
[ &$this, &$jsonResult ] ); // Enables debugging of server results
|
||||
return true;
|
||||
} else {
|
||||
$this->lastError = $this->getError( 'math_unknown_error', $host );
|
||||
|
|
|
@ -270,7 +270,7 @@ class MathTexvc extends MathRenderer {
|
|||
$this->setHash( $newHash );
|
||||
}
|
||||
|
||||
Hooks::run( 'MathAfterTexvc', [ $this, $errmsg ] );
|
||||
Hooks::run( 'MathAfterTexvc', [ &$this, &$errmsg ] );
|
||||
|
||||
if ( $errmsg ) {
|
||||
return $errmsg;
|
||||
|
|
Loading…
Reference in New Issue