Merge "(bug 17808) (bug 21167) use real links for search suggestions"
[lhc/web/wiklou.git] / maintenance / Maintenance.php
index ea649a6..45df0e9 100644 (file)
@@ -108,6 +108,12 @@ abstract class Maintenance {
         */
        private $mDb = null;
 
+       /**
+        * Used when creating separate schema files.
+        * @var resource
+        */
+       public $fileHandle;
+
        /**
         * List of all the core maintenance scripts. This is added
         * to scripts added by extensions in $wgMaintenanceScripts
@@ -946,7 +952,10 @@ abstract class Maintenance {
                $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" );