Merge "Work around annoying Revision::newFromArchiveRow exception."
[lhc/web/wiklou.git] / maintenance / populateRevisionSha1.php
index 2266a3f..d8ff749 100644 (file)
@@ -102,7 +102,8 @@ class PopulateRevisionSha1 extends LoggedUpdateMaintenance {
        protected function doSha1LegacyUpdates() {
                $count = 0;
                $db = $this->getDB( DB_MASTER );
-               $res = $db->select( 'archive', '*', array( 'ar_rev_id IS NULL' ), __METHOD__ );
+               $res = $db->select( 'archive', '*',
+                       array( 'ar_rev_id IS NULL', 'ar_sha1' => '' ), __METHOD__ );
 
                $updateSize = 0;
                $db->begin( __METHOD__ );