Page MenuHomePhabricator

JobQueue::push returns void, return value is used in code
Closed, ResolvedPublic



final public function push( $jobs, $flags = 0 ) {

		$this->batchPush( is_array( $jobs ) ? $jobs : array( $jobs ), $flags );



		$ok = true;
		foreach ( $jobsByType as $type => $jobs ) {
			if ( $this->get( $type )->push( $jobs ) ) {
				JobQueueAggregator::singleton()->notifyQueueNonEmpty( $this->wiki, $type );
			} else {
				$ok = false;

So $ok is always going to become false

Version: 1.23.0
Severity: major



Event Timeline

bzimport raised the priority of this task from to High.
bzimport set Reference to bz64007.
bzimport added a subscriber: Unknown Object (MLST).
Reedy created this task.Apr 16 2014, 5:26 PM

Link to merged Gerrit patch welcome for setting + flags.

Reedy added a comment.Apr 21 2014, 7:00 PM

Fixed in master in by reverting

Cleanup change was valid, just all callers weren't correctly cleaned up, meaning things that were returning true were now returning void

The original revert was backported into REL1_23 already.