X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRandomInCategory.php;h=69436bf79df08b760cd40efec02316fbc2cfc6f6;hb=75301351cf8c7258c1d8ed374474606ec5158226;hp=f9e03ab97415bb2584026f4c363bfe95558a523a;hpb=4cb38fad4b80450f7cf80b80a78fa0a3bfd52861;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialRandomInCategory.php b/includes/specials/SpecialRandomInCategory.php index f9e03ab974..69436bf79d 100644 --- a/includes/specials/SpecialRandomInCategory.php +++ b/includes/specials/SpecialRandomInCategory.php @@ -179,12 +179,12 @@ class SpecialRandomInCategory extends FormSpecialPage { * @param float $rand Random number between 0 and 1 * @param int $offset Extra offset to fudge randomness * @param bool $up True to get the result above the random number, false for below - * + * @return array Query information. + * @throws MWException * @note The $up parameter is supposed to counteract what would happen if there * was a large gap in the distribution of cl_timestamp values. This way instead * of things to the right of the gap being favoured, both sides of the gap * are favoured. - * @return array Query information. */ protected function getQueryInfo( $rand, $offset, $up ) { $op = $up ? '>=' : '<='; @@ -230,7 +230,7 @@ class SpecialRandomInCategory extends FormSpecialPage { if ( !$this->minTimestamp || !$this->maxTimestamp ) { try { list( $this->minTimestamp, $this->maxTimestamp ) = $this->getMinAndMaxForCat( $this->category ); - } catch ( MWException $e ) { + } catch ( Exception $e ) { // Possibly no entries in category. return false; }