When a revision's size is 0, don't clobber it by changing it to null. This
causes, among other things, moves of empty pages to not show a revision
size. If we get to where the else used to be, either mSize is 0 (and doing
nothing is correct), or mSize is already null, in which case this didn't
do anything anyway. We know this because, above, we initialized it with
$this->mSize = isset( $row['len'] ) ? intval( $row['len'] ) : null;
Change-Id: I3d9b9163368c57b9a7906f6569119081b945d57e
$this->mCurrent = false;
// If we still have no length, see it we have the text to figure it out
- if ( !$this->mSize ) {
- if ( $this->mContent !== null ) {
- $this->mSize = $this->mContent->getSize();
- } else {
- #NOTE: this should never happen if we have either text or content object!
- $this->mSize = null;
- }
+ if ( !$this->mSize && $this->mContent !== null ) {
+ $this->mSize = $this->mContent->getSize();
}
// Same for sha1