From caca2a3863097103e788766c23e74c58b9fff2a0 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 22 Sep 2008 02:54:33 +0000 Subject: Bug 340609: Bug->check() should throw an error if no bug ID is passed - Patch by Frédéric Buclin r=bkor a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Bug.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Bugzilla/Bug.pm') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 6f22d967c..1d12ee2cf 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)); -- cgit v1.2.3-24-g4f1b