From: lpsolit%gmail.com <> Date: Mon, 22 Sep 2008 02:57:11 +0000 (+0000) Subject: Bug 340609: ValidateBugId() should throw an error if no bug ID is passed - Patch... X-Git-Tag: bugzilla-3.2rc2~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06a648cd3382547076365ef06e31ebd43b1e5cad;p=thirdparty%2Fbugzilla.git Bug 340609: ValidateBugId() should throw an error if no bug ID is passed - Patch by Frédéric Buclin r=bkor a=LpSolit --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index ffae17895f..6ca9df3baa 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -3303,6 +3303,8 @@ sub ValidateBugID { my $dbh = Bugzilla->dbh; my $user = Bugzilla->user; + ThrowUserError('improper_bug_id_field_value', { field => $field }) unless defined $id; + # Get rid of leading '#' (number) mark, if present. $id =~ s/^\s*#//; # Remove whitespace