From: lpsolit%gmail.com <> Date: Thu, 13 Apr 2006 05:59:46 +0000 (+0000) Subject: Bug 333031: Uninitialized value when entering a new bug and an alias is given - Patch... X-Git-Tag: bugzilla-2.20.2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4864c4aa6cec94987eb01c47afc67e635980694d;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 543734e400..3b81bd05c1 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1001,7 +1001,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);