From caca2a3863097103e788766c23e74c58b9fff2a0 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 22 Sep 2008 02:54:33 +0000 Subject: [PATCH] =?utf8?q?Bug=20340609:=20Bug->check()=20should=20throw=20?= =?utf8?q?an=20error=20if=20no=20bug=20ID=20is=20passed=20-=20Patch=20by?= =?utf8?q?=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Buclin=20?= =?utf8?q?=20r=3Dbkor=20a=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Bugzilla/Bug.pm | 2 ++ 1 file changed, 2 insertions(+) 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)); -- 2.47.2