From: Erik Bernhardson Date: Fri, 7 Mar 2014 03:31:16 +0000 (-0800) Subject: Handle exceptions when testing row validity X-Git-Tag: 1.31.0-rc.0~16505^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=cfb755c7fdfea44b4d641c57bf0cef306cd91648;p=lhc%2Fweb%2Fwiklou.git Handle exceptions when testing row validity This bit of special contributions, according to its comment, is intentionally ignoring errors. Also swallow exceptions with the same expectations. Change-Id: I82ceb0b223159c71796f64a890cf6209a6544209 --- diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index fdb781bf4a..636e7962cb 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -941,8 +941,12 @@ class ContribsPager extends ReverseChronologicalPager { * to extensions to subscribe to the hook to parse the row. */ wfSuppressWarnings(); - $rev = new Revision( $row ); - $validRevision = (bool)$rev->getId(); + try { + $rev = new Revision( $row ); + $validRevision = (bool)$rev->getId(); + } catch ( MWException $e ) { + $validRevision = false; + } wfRestoreWarnings(); if ( $validRevision ) {