Protect against breakage from empty old table
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 26 Jun 2005 18:45:45 +0000 (18:45 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 26 Jun 2005 18:45:45 +0000 (18:45 +0000)
maintenance/upgrade1_5.php

index 0b51c46..5ce8ffd 100644 (file)
@@ -390,7 +390,7 @@ class FiveUpgrade {
                        INDEX usertext_timestamp (rev_user_text,rev_timestamp)
                        ) TYPE=InnoDB", $fname );
 
-               $maxold = $this->dbw->selectField( 'old', 'max(old_id)', '', $fname );
+               $maxold = IntVal( $this->dbw->selectField( 'old', 'max(old_id)', '', $fname ) );
                $this->log( "Last old record is {$maxold}" );
 
                global $wgLegacySchemaConversion;
@@ -1211,4 +1211,4 @@ $upgrade = new FiveUpgrade();
 $step = isset( $options['step'] ) ? $options['step'] : null;
 $upgrade->upgrade( $step );
 
-?>
\ No newline at end of file
+?>