Some ApiQueryUserContributions::prepareQuery code paths don't define
the $index array, but try to use it anyway.
That raises the following notice:
Undefined variable: index
in …/includes/api/ApiQueryUserContributions.php on line 340
This commit ensures we only try to use the variable when needed.
Bug: T141497
Change-Id: Ib9c038b84219bc1886139cb079a33aba74bc5220
$this->addWhereFld( 'ct_tag', $this->params['tag'] );
}
- $this->addOption( 'USE INDEX', $index );
+ if ( isset( $index ) ) {
+ $this->addOption( 'USE INDEX', $index );
+ }
}
/**