]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 340609: Bug->check() should throw an error if no bug ID is passed - Patch by...
authorlpsolit%gmail.com <>
Mon, 22 Sep 2008 02:54:33 +0000 (02:54 +0000)
committerlpsolit%gmail.com <>
Mon, 22 Sep 2008 02:54:33 +0000 (02:54 +0000)
Bugzilla/Bug.pm

index 6f22d967c45cba5fab9df03b63b8be43ae6dcbff..1d12ee2cfc41cbc4b6056e84f5f82f1176deeff1 100644 (file)
@@ -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));