Page MenuHomePhabricator

Notice: Undefined index: 1 in UploadWizardCampaign.php on line 447
Closed, ResolvedPublic2 Estimated Story Points

Description

Spotted in production:

Notice: Undefined index: 1 in /srv/mediawiki/php-1.26wmf21/extensions/UploadWizard/includes/UploadWizardCampaign.php on line 447

Event Timeline

demon raised the priority of this task from to Low.
demon updated the task description. (Show Details)
demon subscribed.
Restricted Application added a subscriber: Steinsplitter. · View Herald Transcript
matmarex added subscribers: kai.nissen, matmarex.

Apparently a small bug in da6e9ac6:

	private function getButtonHrefByObjectReference( $objRef ) {
/*447*/		list( $wiki, $title ) = explode( '|', $objRef );
		if ( Interwiki::isValidInterwiki( $wiki ) ) {
			return str_replace( '$1', $title, Interwiki::fetch( $wiki )->getURL() );
		}
		return false;
	}

I'm not sure what this code is supposed to do when $objRef (pipe-separated string) has only one value. Should that be ignored, or treated as a title on the current wiki? @kai.nissen?

Change 236026 had a related patch set uploaded (by Kai Nissen (WMDE)):
Consider the object reference not being passed in the expected format

https://gerrit.wikimedia.org/r/236026

Change 236026 merged by jenkins-bot:
Consider the object reference not being passed in the expected format

https://gerrit.wikimedia.org/r/236026