Archive records for deleted pages do not have an ar_text_id,
if they were deleted before big schema overhaul in MW 1.5.
This script was assuming all archive records had an ar_text_id.
Patch by Dévai Tamás.
Change-Id: I4776a8a0f29b8299ec6d27949dc53a96ece81f39
* Daniel Werner
* David Baumgarten
* Denny Vrandecic
+* Dévai Tamás
* Edward Z. Yang
* Elvis Stansvik
* Erwin Dokter
$this->output( 'Searching for active text records in archive table...' );
$res = $dbw->query( "SELECT DISTINCT ar_text_id FROM $tbl_arc" );
foreach ( $res as $row ) {
- $cur[] = $row->ar_text_id;
+ # old pre-MW 1.5 records can have null ar_text_id's.
+ if ( $row->ar_text_id !== null ) {
+ $cur[] = $row->ar_text_id;
+ }
}
$this->output( "done.\n" );