jenkins-bot has submitted this change and it was merged.

Change subject: Update call to MathRenderer due to changes to Math extension.
......................................................................


Update call to MathRenderer due to changes to Math extension.

Bug: 46132
Change-Id: I8ee3fd1360327e849d4ec217b212608636995d73
---
M ConfirmEdit.php
M MathCaptcha.class.php
M README
3 files changed, 8 insertions(+), 3 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ConfirmEdit.php b/ConfirmEdit.php
index 1abd5ae..d861a04 100644
--- a/ConfirmEdit.php
+++ b/ConfirmEdit.php
@@ -40,7 +40,7 @@
        'name' => 'ConfirmEdit',
        'author' => array( 'Brion Vibber', '...' ),
        'url' => 'https://www.mediawiki.org/wiki/Extension:ConfirmEdit',
-       'version' => '1.1',
+       'version' => '1.2',
        'descriptionmsg' => 'captcha-desc',
 );
 
diff --git a/MathCaptcha.class.php b/MathCaptcha.class.php
index 7874991..13a79a9 100644
--- a/MathCaptcha.class.php
+++ b/MathCaptcha.class.php
@@ -40,11 +40,10 @@
        /** Fetch the math */
        function fetchMath( $sum ) {
                if ( MWInit::classExists( 'MathRenderer' ) ) {
-                       $math = new MathRenderer( $sum );
+                       $math = MathRenderer::getRenderer( $sum, array(), 
MW_MATH_PNG );
                } else {
                        throw new MWException( 'MathCaptcha requires the Math 
extension for MediaWiki versions 1.18 and above.' );
                }
-               $math->setOutputMode( MW_MATH_PNG );
                $html = $math->render();
                return preg_replace( '/alt=".*?"/', '', $html );
        }
diff --git a/README b/README
index 70e2c22..acfe481 100644
--- a/README
+++ b/README
@@ -40,3 +40,9 @@
 The Asirra module was written by Bachsau.
 
 Additional maintenance work was done by Yaron Koren.
+
+== Changelog ==
+
+= Version 1.2
+Fixes bug 46132 - ConfirmEdit fatal error when using MathCaptcha and current 
Math extension.
+See <https://bugzilla.wikimedia.org/show_bug.cgi?id=46132>.

-- 
To view, visit https://gerrit.wikimedia.org/r/59773
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8ee3fd1360327e849d4ec217b212608636995d73
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Physikerwelt <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to