r78028 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78027‎ | r78028 | r78029 >
Date:22:58, 7 December 2010
Author:mah
Status:ok (Comments)
Tags:
Comment:
Found an error when $res = false while running tests
Modified paths:
  • /trunk/phase3/includes/filerepo/ArchivedFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/ArchivedFile.php
@@ -119,8 +119,7 @@
120120 $conds,
121121 __METHOD__,
122122 array( 'ORDER BY' => 'fa_timestamp DESC' ) );
123 -
124 - if ( $dbr->numRows( $res ) == 0 ) {
 123+ if ( $res == false || $dbr->numRows( $res ) == 0 ) {
125124 // this revision does not exist?
126125 return;
127126 }

Comments

#Comment by Platonides (talk | contribs)   19:00, 28 December 2010

I wonder if this shouldn't be fixed instead into Database::numRows

Status & tagging log