Commit ae887eab authored by mkanat%kerio.com's avatar mkanat%kerio.com

Bug 310108: checksetup.pl fails if attachstatuses or attachstatusdefs tables are empty

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
parent 34811ca7
......@@ -3210,10 +3210,9 @@ if ($dbh->bz_table_info("attachstatuses")
print "Converting attachment statuses to flags...\n";
# Get IDs for the old attachment status and new flag fields.
$sth = $dbh->prepare("SELECT fieldid FROM fielddefs " .
"WHERE name='attachstatusdefs.name'");
$sth->execute();
my $old_field_id = $sth->fetchrow_arrayref()->[0] || 0;
my ($old_field_id) = $dbh->selectrow_array(
"SELECT fieldid FROM fielddefs WHERE name='attachstatusdefs.name'")
|| 0;
$sth = $dbh->prepare("SELECT fieldid FROM fielddefs " .
"WHERE name='flagtypes.name'");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment