Merge "Error Msg for missing db username & password when installing"
[lhc/web/wiklou.git] / includes / specials / SpecialContributions.php
index 3acf141..51606b7 100644 (file)
@@ -951,8 +951,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 ) {
@@ -1091,7 +1095,7 @@ class ContribsPager extends ReverseChronologicalPager {
                wfRunHooks( 'ContributionsLineEnding', array( $this, &$ret, $row, &$classes ) );
 
                if ( $classes === array() && $ret === '' ) {
-                       wfDebug( 'Dropping Special:Contribution row that could not be formatted' );
+                       wfDebug( "Dropping Special:Contribution row that could not be formatted\n" );
                        $ret = "<!-- Could not format Special:Contribution row. -->\n";
                } else {
                        $ret = Html::rawElement( 'li', array( 'class' => $classes ), $ret ) . "\n";