From 0543d7bdce492e4c85786d1a4166dd2658cff5d1 Mon Sep 17 00:00:00 2001 From: X! Date: Wed, 24 Feb 2010 17:06:19 +0000 Subject: [PATCH] Whoops, committed wrong version --- includes/api/ApiBase.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 3905995a68..39205bdce2 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -647,12 +647,12 @@ abstract class ApiBase { case 'user': if( !is_array( $value ) ) $value = array( $value ); - foreach( $value as $val ) { - $title = Title::makeTitleSafe( NS_USER, $value ); + foreach( $value as $key => $val ) { + $title = Title::makeTitleSafe( NS_USER, $val ); if ( is_null( $title ) ) { $this->dieUsage( "Invalid value for user parameter $encParamName", "baduser_{$encParamName}" ); } - $value = $title->getText(); + $value[$key] = $title->getText(); } if( !$multi ) $value = $value[0]; -- 2.20.1