From: lpsolit%gmail.com <> Date: Mon, 22 Sep 2008 03:03:54 +0000 (+0000) Subject: Bug 340609: ValidateBugId() should throw an error if no bug ID is passed - Patch... X-Git-Tag: bugzilla-3.0.6~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97bca1b6bdc1ff1830738214f30978c9a8c1ed11;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 old mode 100755 new mode 100644 index 5dbcb6621d..a71f239e5f --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -2003,6 +2003,8 @@ sub ValidateBugID { my $dbh = Bugzilla->dbh; my $user = Bugzilla->user; + ThrowUserError('invalid_bug_id_or_alias', { field => $field }) unless defined $id; + # Get rid of leading '#' (number) mark, if present. $id =~ s/^\s*#//; # Remove whitespace