From: lpsolit%gmail.com <> Date: Mon, 22 Sep 2008 02:54:33 +0000 (+0000) Subject: Bug 340609: Bug->check() should throw an error if no bug ID is passed - Patch by... X-Git-Tag: bugzilla-3.3.1~146 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=caca2a3863097103e788766c23e74c58b9fff2a0;p=thirdparty%2Fbugzilla.git Bug 340609: Bug->check() 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 6f22d967c4..1d12ee2cfc 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -296,6 +296,8 @@ sub check { my $class = shift; my ($id, $field) = @_; + ThrowUserError('improper_bug_id_field_value', { field => $field }) unless defined $id; + # Bugzilla::Bug throws lots of special errors, so we don't call # SUPER::check, we just call our new and do our own checks. my $self = $class->new(trim($id));