Mobrovac has submitted this change and it was merged.
Change subject: Fix: Convert all array() syntax to []
......................................................................
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
---
M Math.hooks.php
M MathLaTeXML.php
M MathMathML.php
M MathTexvc.php
4 files changed, 4 insertions(+), 4 deletions(-)
Approvals:
Mobrovac: Looks good to me, approved
Jforrester: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/Math.hooks.php b/Math.hooks.php
index f7fe018..2e9ad33 100644
--- a/Math.hooks.php
+++ b/Math.hooks.php
@@ -230,7 +230,7 @@
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();
diff --git a/MathLaTeXML.php b/MathLaTeXML.php
index 755920e..765342e 100644
--- a/MathLaTeXML.php
+++ b/MathLaTeXML.php
@@ -117,7 +117,7 @@
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
diff --git a/MathMathML.php b/MathMathML.php
index 48dedb7..64fe5d7 100644
--- a/MathMathML.php
+++ b/MathMathML.php
@@ -513,7 +513,7 @@
$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 );
diff --git a/MathTexvc.php b/MathTexvc.php
index a3192fc..8a1bc29 100644
--- a/MathTexvc.php
+++ b/MathTexvc.php
@@ -270,7 +270,7 @@
$this->setHash( $newHash );
}
- Hooks::run( 'MathAfterTexvc', [ $this, $errmsg ] );
+ Hooks::run( 'MathAfterTexvc', [ &$this, &$errmsg ] );
if ( $errmsg ) {
return $errmsg;
--
To view, visit https://gerrit.wikimedia.org/r/284289
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I90b6501000200c1b462407b769113358eb5c762f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Mobrovac <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: Physikerwelt <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits