jenkins-bot has submitted this change and it was merged.
Change subject: Fix PHP warning when using createaccount API
......................................................................
Fix PHP warning when using createaccount API
Change-Id: I5975c34be4fc11af8dcdd394c0c6605e72f13582
---
M SimpleCaptcha/Captcha.php
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Anomie: Looks good to me, approved
Florianschmidtwelzow: Looks good to me, approved
jenkins-bot: Verified
diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php
index 7697ab7..4f010af 100755
--- a/SimpleCaptcha/Captcha.php
+++ b/SimpleCaptcha/Captcha.php
@@ -1150,7 +1150,8 @@
// If we failed a captcha, override the generic
'Warning' result string
if ( $result['result'] === 'Warning' && isset(
$result['warnings'] ) ) {
- foreach ( $result['warnings'] as $warning ) {
+ $warnings =
ApiResult::stripMetadataNonRecursive( $result['warnings'] );
+ foreach ( $warnings as $warning ) {
if ( $warning['message'] ===
'captcha-createaccount-fail' ) {
$this->addCaptchaAPI( $result );
$result['result'] =
'NeedCaptcha';
@@ -1161,6 +1162,8 @@
'event' =>
'captcha.display',
'type' =>
'accountcreation',
) );
+
+ break;
}
}
}
--
To view, visit https://gerrit.wikimedia.org/r/285458
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5975c34be4fc11af8dcdd394c0c6605e72f13582
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Gergő Tisza <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits