diff options
author | gerv%gerv.net <> | 2002-04-30 04:29:52 +0200 |
---|---|---|
committer | gerv%gerv.net <> | 2002-04-30 04:29:52 +0200 |
commit | ddd9ebd5c577e5f0bcf2f0b30f0dba34b95dbeb3 (patch) | |
tree | b9734d507b22416a3e105dcf8522809e4f29d237 | |
parent | 947bd2d3aaafa546d2666874a5fc36aefbf6710e (diff) | |
download | bugzilla-ddd9ebd5c577e5f0bcf2f0b30f0dba34b95dbeb3.tar.gz bugzilla-ddd9ebd5c577e5f0bcf2f0b30f0dba34b95dbeb3.tar.xz |
Bug 140953 - Creating the first attachment status fails. Patch by jouni@heikniemi.net, 2xr=myk.
-rwxr-xr-x | editattachstatuses.cgi | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editattachstatuses.cgi b/editattachstatuses.cgi index f4176a321..3929940f2 100755 --- a/editattachstatuses.cgi +++ b/editattachstatuses.cgi @@ -239,7 +239,8 @@ sub insert SendSQL("LOCK TABLES attachstatusdefs WRITE"); SendSQL("SELECT MAX(id) FROM attachstatusdefs"); - my $id = FetchSQLData() + 1; + my $id = FetchSQLData() || 0; + $id++; SendSQL("INSERT INTO attachstatusdefs (id, name, description, sortkey, product) VALUES ($id, $name, $desc, $::FORM{'sortkey'}, $product)"); SendSQL("UNLOCK TABLES"); |