From 222dc8763e00702705acb32a15ec62d22517ce53 Mon Sep 17 00:00:00 2001 From: PjoeterBliep Date: Thu, 19 Sep 2024 09:38:29 +0200 Subject: [PATCH] Move comment --- src/RSHiScores.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RSHiScores.php b/src/RSHiScores.php index 3d60194..7e74224 100644 --- a/src/RSHiScores.php +++ b/src/RSHiScores.php @@ -291,7 +291,6 @@ private static function escapeStrings( $arrayOrString ) { * @throws Exception If $skill or $type could not be found, or if endpoint returned unexpected results */ private static function getSingleSkillData( $data, $skill, $type, $fromInt ) { - // Case-insensitive, use same processing as self::postFetch did if ( $fromInt ) { if ( (int) $skill >= count($data) ) { throw new Exception( wfMessage( 'rshiscores-error-unknown-skill' ) ); @@ -299,6 +298,7 @@ private static function getSingleSkillData( $data, $skill, $type, $fromInt ) { // Semi-backwards compatibility: If skill is integer "n", take the "n"th element of the data. $skill = array_keys( $data )[ $skill ]; } else { + // Case-insensitive, use same processing as self::postFetch did $skill = self::escapeStrings( strtolower( $skill ) ); } if ( !isset( $data[ $skill ] ) ) {