jenkins-bot has submitted this change and it was merged.
Change subject: Fix iterator in batchGetMathML
......................................................................
Fix iterator in batchGetMathML
In case there was an error with a check request the SVG size
information was not assigned to the correct SVG image.
This was due to this obvious bug in the batchGetMathML
iterator.
Bug: T136688
Change-Id: Ib2660597a6fb6ef96ba0c5c0ee0fa396b0ea3a24
---
M MathRestbaseInterface.php
1 file changed, 3 insertions(+), 4 deletions(-)
Approvals:
Mobrovac: Looks good to me, approved
jenkins-bot: Verified
diff --git a/MathRestbaseInterface.php b/MathRestbaseInterface.php
index d2eef4f..3f42832 100644
--- a/MathRestbaseInterface.php
+++ b/MathRestbaseInterface.php
@@ -49,21 +49,20 @@
$i ++;
}
$results = $serviceClient->runMulti( $requests );
- $i = 0;
+ $lenRbis = count( $rbis );
$j = 0;
- foreach ( $results as $response ) {
+ for ( $i = 0; $i < $lenRbis; $i ++ ) {
if ( !in_array( $i, $skips ) ) {
/** @var MathRestbaseInterface $rbi */
$rbi = $rbis[$i];
try {
- $mml = $rbi->evaluateContentResponse(
'mml', $response, $requests[$j] );
+ $mml = $rbi->evaluateContentResponse(
'mml', $results[$j], $requests[$j] );
$rbi->mml = $mml;
}
catch ( Exception $e ) {
}
$j ++;
}
- $i ++;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/292189
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib2660597a6fb6ef96ba0c5c0ee0fa396b0ea3a24
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: Mobrovac <[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