Index: trunk/phase3/includes/Revision.php |
— | — | @@ -53,6 +53,10 @@ |
54 | 54 | // Get the latest revision ID from the master |
55 | 55 | $dbw = wfGetDB( DB_MASTER ); |
56 | 56 | $latest = $dbw->selectField( 'page', 'page_latest', $conds, __METHOD__ ); |
| 57 | + if ( $latest === false ) { |
| 58 | + // Page does not exist |
| 59 | + return null; |
| 60 | + } |
57 | 61 | $conds['rev_id'] = $latest; |
58 | 62 | } else { |
59 | 63 | // Use a join to get the latest revision |