From 5056104f4d94ba7e2c3211e7c66b32d0762c0767 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sat, 23 May 2020 23:26:10 +0200 Subject: [PATCH] Parse messages in string context Change-Id: I8b459547448d5843557a84f14145c9278f8b340a --- includes/SpecialContact.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/SpecialContact.php b/includes/SpecialContact.php index 9a6b472..38c942b 100644 --- a/includes/SpecialContact.php +++ b/includes/SpecialContact.php @@ -439,8 +439,9 @@ class SpecialContact extends UnlistedSpecialPage { ); if ( !$mailResult->isOK() ) { - wfDebug( __METHOD__ . ': got error from UserMailer: ' . $mailResult->getMessage() . "\n" ); - return $this->msg( 'contactpage-usermailererror' )->text() . $mailResult->getMessage(); + wfDebug( __METHOD__ . ': got error from UserMailer: ' . + $mailResult->getMessage()->text() . "\n" ); + return $this->msg( 'contactpage-usermailererror' )->text() . $mailResult->getMessage()->text(); } // if the user requested a copy of this mail, do this now, @@ -460,7 +461,7 @@ class SpecialContact extends UnlistedSpecialPage { // We can either show them an error, or we can say everything was fine, // or we can say we sort of failed AND sort of succeeded. Of these options, // simply saying there was an error is probably best. - return $this->msg( 'contactpage-usermailererror' )->text() . $ccResult->getMessage(); + return $this->msg( 'contactpage-usermailererror' )->text() . $ccResult->getMessage()->text(); } } }