Skip to content

Instantly share code, notes, and snippets.

@ciencia
Created April 23, 2025 21:31
Show Gist options
  • Save ciencia/547590198a311cd3cecf89e3a1edd9d1 to your computer and use it in GitHub Desktop.
Save ciencia/547590198a311cd3cecf89e3a1edd9d1 to your computer and use it in GitHub Desktop.
MediaWiki ext-SocialProfile revert d2c37ac (breaks 1.39)
commit d2c37aceb43264839ab5594675bbd7ae065e992a
Author: Jack Phoenix <[email protected]>
Date: Fri Mar 28 15:39:25 2025 +0200
Fix "Deprecated: Use of string return from RemoveAvatar::getDescription() was deprecated in MediaWiki 1.41" on Special:SpecialPages on MW 1.43
Change-Id: I971a5fccdb8212ecb6619122a4652d67127bd8cd
diff --git b/UserProfile/includes/specials/SpecialRemoveAvatar.php a/UserProfile/includes/specials/SpecialRemoveAvatar.php
index 19ee4c3b..38872af6 100644
--- b/UserProfile/includes/specials/SpecialRemoveAvatar.php
+++ a/UserProfile/includes/specials/SpecialRemoveAvatar.php
@@ -42,13 +42,13 @@ class RemoveAvatar extends SpecialPage {
* Special page description shown on Special:SpecialPages -- different for
* privileged users and mortals
*
- * @return Message
+ * @return string
*/
function getDescription() {
if ( $this->isUserPrivileged() ) {
- return $this->msg( 'removeavatar' );
+ return $this->msg( 'removeavatar' )->plain();
} else {
- return $this->msg( 'removeavatar-remove-my-avatar' );
+ return $this->msg( 'removeavatar-remove-my-avatar' )->plain();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment