From: lpsolit%gmail.com <> Date: Thu, 13 Apr 2006 05:57:53 +0000 (+0000) Subject: Bug 333031: Uninitialized value when entering a new bug and an alias is given - Patch... X-Git-Tag: bugzilla-2.22~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c614d54974dbd3c84a63bdb817d714c03e5ab940;p=thirdparty%2Fbugzilla.git Bug 333031: Uninitialized value when entering a new bug and an alias is given - Patch by Frédéric Buclin r=wicked a=justdave --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index f75c1ad0b2..8e937ff726 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1201,7 +1201,7 @@ sub ValidateBugAlias { # Make sure the alias is unique. my $query = "SELECT bug_id FROM bugs WHERE alias = ?"; - if (detaint_natural($curr_id)) { + if ($curr_id && detaint_natural($curr_id)) { $query .= " AND bug_id != $curr_id"; } my $id = $dbh->selectrow_array($query, undef, $alias);