Merge "Error Msg for missing db username & password when installing"
[lhc/web/wiklou.git] / includes / specials / SpecialContributions.php
index 3642750..51606b7 100644 (file)
@@ -26,7 +26,6 @@
  *
  * @ingroup SpecialPage
  */
-
 class SpecialContributions extends IncludableSpecialPage {
        protected $opts;
 
@@ -66,6 +65,7 @@ class SpecialContributions extends IncludableSpecialPage {
                        if ( !$this->including() ) {
                                $out->addHTML( $this->getForm() );
                        }
+
                        return;
                }
 
@@ -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";