Last modified: 2012-08-01 15:46:15 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 T40898, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38898 - Notices on Special:GlobalUsers
Notices on Special:GlobalUsers
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CentralAuth (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-31 22:40 UTC by Alex Monk
Modified: 2012-08-01 15:46 UTC (History)
5 users (show)

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


Attachments

Description Alex Monk 2012-07-31 22:40:49 UTC
These notices are coming up on Special:GlobalUsers for each user shown:

Notice: Undefined property: stdClass::$user_name in /path/to/mediawiki/includes/specials/SpecialListusers.php on line 193

Notice: Undefined property: stdClass::$user_name in /path/to/mediawiki/includes/specials/SpecialListusers.php on line 194

Roan Kattouw provided a backtrace: http://pastebin.com/xr2fYAAp
He also said that while the notice itself occurs in core, he's pretty sure GlobalUsersPager is causing it by not selecting the user_name column or something.
Comment 1 Sam Reed (reedy) 2012-07-31 22:51:41 UTC
It'd be gu_name from CA tables, not user_name

Where is this being seen?

	function doBatchLookups() {
		$batch = new LinkBatch();
		# Give some pointers to make user links
		foreach ( $this->mResult as $row ) {
			$batch->add( NS_USER, $row->user_name );
			$batch->add( NS_USER_TALK, $row->user_name );
		}
		$batch->execute();
		$this->mResult->rewind();
	}

Probably needs/wantings $row->user_name swapping for $row->gu_user (duplicate the code in the GlobalUsersPager, and replace to fix), or variablise the value of the username ( $this->userField = 'gu_name'; in the constructor then use $row->{$this->userField}, or some such abomination)
Comment 2 Alex Monk 2012-08-01 01:23:14 UTC
I was about to upload this fix to Gerrit for review, but it seems Szymon Świerkosz already did: Gerrit change #6911
Comment 3 Sam Reed (reedy) 2012-08-01 15:46:15 UTC
(In reply to comment #2)
> I was about to upload this fix to Gerrit for review, but it seems Szymon
> Świerkosz already did: Gerrit change #6911

Great minds think alike ;)

Submitted

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


Navigation
Links