From a6e101025d4b6c3046ac4f5a08119f2e04e58ad2 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 20 Nov 2008 15:15:00 +0000 Subject: [PATCH] Fix up r43673: reindex the rights array after removing duplicates --- includes/api/ApiQueryUserInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiQueryUserInfo.php b/includes/api/ApiQueryUserInfo.php index 1bc30ae57a..6a02f6ceb8 100644 --- a/includes/api/ApiQueryUserInfo.php +++ b/includes/api/ApiQueryUserInfo.php @@ -77,7 +77,7 @@ class ApiQueryUserInfo extends ApiQueryBase { } if (isset($this->prop['rights'])) { // User::getRights() may return duplicate values, strip them - $vals['rights'] = array_unique($wgUser->getRights()); + $vals['rights'] = array_values(array_unique($wgUser->getRights())); $result->setIndexedTagName($vals['rights'], 'r'); // even if empty } if (isset($this->prop['options'])) { -- 2.20.1