Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -792,9 +792,16 @@ |
793 | 793 | array( 'action' => 'history' ) |
794 | 794 | ); |
795 | 795 | |
796 | | - $parentLen = isset( $this->mParentLens[$row->rev_parent_id] ) ? $this->mParentLens[$row->rev_parent_id] : 0; |
797 | | - $chardiff = ' . . ' . ChangesList::showCharacterDifference( |
798 | | - $parentLen, $row->rev_len ) . ' . . '; |
| 796 | + if ( $row->rev_parent_id === null ) { |
| 797 | + // For some reason rev_parent_id isn't populated for this row. |
| 798 | + // Its rumoured this is true on wikipedia for some revisions (bug 34922). |
| 799 | + // Next best thing is to have the total number of bytes. |
| 800 | + $chardiff = ' . . ' . Linker::formatRevisionSize( $row->rev_len ) . ' . . '; |
| 801 | + } else { |
| 802 | + $parentLen = isset( $this->mParentLens[$row->rev_parent_id] ) ? $this->mParentLens[$row->rev_parent_id] : 0; |
| 803 | + $chardiff = ' . . ' . ChangesList::showCharacterDifference( |
| 804 | + $parentLen, $row->rev_len ) . ' . . '; |
| 805 | + } |
799 | 806 | |
800 | 807 | $lang = $this->getLanguage(); |
801 | 808 | $comment = $lang->getDirMark() . Linker::revComment( $rev, false, true ); |