aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-12-13 12:50:45 +0000
committermkanat%kerio.com <>2005-12-13 12:50:45 +0000
commitae887eab29d3f2a665e6b188d3cb834825daa57c (patch)
tree1b5a9fe3a56f97702ff4b64522b776664ea8b9d4 /checksetup.pl
parentBug 319220: checksetup.pl can't cope with a standard CVS install or update. (diff)
downloadbugzilla-ae887eab29d3f2a665e6b188d3cb834825daa57c.tar.gz
bugzilla-ae887eab29d3f2a665e6b188d3cb834825daa57c.tar.bz2
bugzilla-ae887eab29d3f2a665e6b188d3cb834825daa57c.zip
Bug 310108: checksetup.pl fails if attachstatuses or attachstatusdefs tables are empty
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl7
1 files changed, 3 insertions, 4 deletions
diff --git a/checksetup.pl b/checksetup.pl
index 7f207faf4..e21600ebf 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -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'");