Fix Undefined variable issue in ApiQueryUserContributions
authorSébastien Santoro <dereckson@espace-win.org>
Thu, 28 Jul 2016 00:17:33 +0000 (00:17 +0000)
committerSébastien Santoro <dereckson@espace-win.org>
Thu, 28 Jul 2016 00:17:33 +0000 (00:17 +0000)
commit52b9436b69e9dbf95238b150dbdb48f3631ccffa
tree5803176b09e55a17415c99ee0d2724a572fea25a
parentef06c85d9b4e260ce586e546a35648ae35f3e24a
Fix Undefined variable issue in ApiQueryUserContributions

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
includes/api/ApiQueryUserContributions.php