From f5ef28cadc15ae027f7580467314051d54cb7014 Mon Sep 17 00:00:00 2001 From: Thalia Date: Mon, 13 May 2019 15:20:38 +0100 Subject: [PATCH] Make ApiQueryUserInfo::getBlockInfo accept an AbstractBlock This method was removed (I84ed216) before the Block class was refactored (I83bceb5) and restored (If47a938) after the refactor. After the refactor, this method should accept and AbstractBlock, so it can handle a SystemBlock as well as a database Block. Change-Id: Ice8a2e7c19e88406229bd836a45f377abdb72fb6 --- includes/api/ApiQueryUserInfo.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiQueryUserInfo.php b/includes/api/ApiQueryUserInfo.php index d73fbc4d32..ba7280da10 100644 --- a/includes/api/ApiQueryUserInfo.php +++ b/includes/api/ApiQueryUserInfo.php @@ -20,6 +20,7 @@ * @file */ +use MediaWiki\Block\AbstractBlock; use MediaWiki\MediaWikiServices; /** @@ -56,10 +57,10 @@ class ApiQueryUserInfo extends ApiQueryBase { * Get basic info about a given block * * @deprecated since 1.34 Use ApiBlockInfoTrait::getBlockDetails() instead. - * @param Block $block + * @param AbstractBlock $block * @return array See ApiBlockInfoTrait::getBlockDetails */ - public static function getBlockInfo( Block $block ) { + public static function getBlockInfo( AbstractBlock $block ) { wfDeprecated( __METHOD__, '1.34' ); // Hack to access a private method from a trait: -- 2.20.1