Last modified: 2013-07-25 07:06:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T48844, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46844 - User groups returned twice
User groups returned twice
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.21.x
All All
: Normal normal (vote)
: ---
Assigned To: Niklas Laxström
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-03 12:16 UTC by Niklas Laxström
Modified: 2013-07-25 07:06 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Niklas Laxström 2013-04-03 12:16:57 UTC
I have a very simple test case:
		$user->setEmail( $email );
		$user->setPassword( $password );
		$status = $user->addToDatabase();

		if ( !$status->isOK() ) {
			throw new MWException( $status->getWikiText() );
		}

		// Need to have an id first
		$user->addGroup( 'translate-sandboxed' );
		var_dump( $user->getGroups() ); die();

This prints:
array(2) {
  [0]=>
  string(19) "translate-sandboxed"
  [1]=>
  string(19) "translate-sandboxed"
}

It should return it only once.
Comment 1 Niklas Laxström 2013-04-03 12:18:37 UTC
https://gerrit.wikimedia.org/r/57284
Comment 2 Niklas Laxström 2013-04-03 12:43:31 UTC
The patch is broken. Does anyone have an idea why I sometimes get dupes but not always?
Comment 3 Niklas Laxström 2013-04-03 12:48:29 UTC
I've updated the patch.
Comment 4 Niklas Laxström 2013-06-12 09:25:18 UTC
Patch has been merged.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links