[MediaWiki-commits] [Gerrit] Fix handling of error messages from the 'SpecialPasswordRese... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix handling of error messages from the 'SpecialPasswordResetOnSubmit' hook .. Fix handling of error messages from the 'SpecialPasswordResetOnSubmit' hook $error might be an array of key + values, but wfMessage() treats that as an array of alternative message keys instead so the values are lost. Message::newFromSpecifier(), on the other hand, does exactly what we want. Change-Id: I25765869f6888ac793c2af9caaa9bbdf2224d51a (cherry picked from commit b6487447463de476ad1b8bc0eff3d4972c9d44b8) --- M includes/user/PasswordReset.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/user/PasswordReset.php b/includes/user/PasswordReset.php index 60144bb..bc87cd0 100644 --- a/includes/user/PasswordReset.php +++ b/includes/user/PasswordReset.php @@ -153,7 +153,7 @@ 'Capture' => $displayPassword ? '1' : null, ]; if ( !Hooks::run( 'SpecialPasswordResetOnSubmit', [ &$users, $data, &$error ] ) ) { - return StatusValue::newFatal( wfMessage( $error ) ); + return StatusValue::newFatal( Message::newFromSpecifier( $error ) ); } if ( !$users ) { -- To view, visit https://gerrit.wikimedia.org/r/294832 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I25765869f6888ac793c2af9caaa9bbdf2224d51a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_27 Gerrit-Owner: PleaseStandGerrit-Reviewer: Anomie Gerrit-Reviewer: Chad Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix handling of error messages from the 'SpecialPasswordRese... - change (mediawiki/core)
PleaseStand has uploaded a new change for review. https://gerrit.wikimedia.org/r/294832 Change subject: Fix handling of error messages from the 'SpecialPasswordResetOnSubmit' hook .. Fix handling of error messages from the 'SpecialPasswordResetOnSubmit' hook $error might be an array of key + values, but wfMessage() treats that as an array of alternative message keys instead so the values are lost. Message::newFromSpecifier(), on the other hand, does exactly what we want. Change-Id: I25765869f6888ac793c2af9caaa9bbdf2224d51a (cherry picked from commit b6487447463de476ad1b8bc0eff3d4972c9d44b8) --- M includes/user/PasswordReset.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/32/294832/1 diff --git a/includes/user/PasswordReset.php b/includes/user/PasswordReset.php index 60144bb..bc87cd0 100644 --- a/includes/user/PasswordReset.php +++ b/includes/user/PasswordReset.php @@ -153,7 +153,7 @@ 'Capture' => $displayPassword ? '1' : null, ]; if ( !Hooks::run( 'SpecialPasswordResetOnSubmit', [ &$users, $data, &$error ] ) ) { - return StatusValue::newFatal( wfMessage( $error ) ); + return StatusValue::newFatal( Message::newFromSpecifier( $error ) ); } if ( !$users ) { -- To view, visit https://gerrit.wikimedia.org/r/294832 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25765869f6888ac793c2af9caaa9bbdf2224d51a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_27 Gerrit-Owner: PleaseStandGerrit-Reviewer: Anomie ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix handling of error messages from the 'SpecialPasswordRese... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix handling of error messages from the 'SpecialPasswordResetOnSubmit' hook .. Fix handling of error messages from the 'SpecialPasswordResetOnSubmit' hook $error might be an array of key + values, but wfMessage() treats that as an array of alternative message keys instead so the values are lost. Message::newFromSpecifier(), on the other hand, does exactly what we want. Change-Id: I25765869f6888ac793c2af9caaa9bbdf2224d51a --- M includes/user/PasswordReset.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/user/PasswordReset.php b/includes/user/PasswordReset.php index 60144bb..bc87cd0 100644 --- a/includes/user/PasswordReset.php +++ b/includes/user/PasswordReset.php @@ -153,7 +153,7 @@ 'Capture' => $displayPassword ? '1' : null, ]; if ( !Hooks::run( 'SpecialPasswordResetOnSubmit', [ &$users, $data, &$error ] ) ) { - return StatusValue::newFatal( wfMessage( $error ) ); + return StatusValue::newFatal( Message::newFromSpecifier( $error ) ); } if ( !$users ) { -- To view, visit https://gerrit.wikimedia.org/r/294732 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I25765869f6888ac793c2af9caaa9bbdf2224d51a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: AnomieGerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix handling of error messages from the 'SpecialPasswordRese... - change (mediawiki/core)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/294732 Change subject: Fix handling of error messages from the 'SpecialPasswordResetOnSubmit' hook .. Fix handling of error messages from the 'SpecialPasswordResetOnSubmit' hook $error might be an array of key + values, but wfMessage() treats that as an array of alternative message keys instead so the values are lost. Message::newFromSpecifier(), on the other hand, does exactly what we want. Change-Id: I25765869f6888ac793c2af9caaa9bbdf2224d51a --- M includes/user/PasswordReset.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/32/294732/1 diff --git a/includes/user/PasswordReset.php b/includes/user/PasswordReset.php index 60144bb..bc87cd0 100644 --- a/includes/user/PasswordReset.php +++ b/includes/user/PasswordReset.php @@ -153,7 +153,7 @@ 'Capture' => $displayPassword ? '1' : null, ]; if ( !Hooks::run( 'SpecialPasswordResetOnSubmit', [ &$users, $data, &$error ] ) ) { - return StatusValue::newFatal( wfMessage( $error ) ); + return StatusValue::newFatal( Message::newFromSpecifier( $error ) ); } if ( !$users ) { -- To view, visit https://gerrit.wikimedia.org/r/294732 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25765869f6888ac793c2af9caaa9bbdf2224d51a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits