From: lpsolit%gmail.com <> Date: Thu, 13 Apr 2006 05:56:05 +0000 (+0000) Subject: Bug 333031: Uninitialized value when entering a new bug and an alias is given - Patch... X-Git-Tag: bugzilla-2.23.1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3cf3b1a50a2e0434aa051171b1337076bdf1540;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 42bfe8664c..445e13ec6f 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1198,7 +1198,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);