From: Roan Kattouw Date: Thu, 20 Nov 2008 15:15:00 +0000 (+0000) Subject: Fix up r43673: reindex the rights array after removing duplicates X-Git-Tag: 1.31.0-rc.0~44252 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=a6e101025d4b6c3046ac4f5a08119f2e04e58ad2;p=lhc%2Fweb%2Fwiklou.git Fix up r43673: reindex the rights array after removing duplicates --- 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'])) {