]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 597772: Make add_see_also check for undef input
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 28 Sep 2010 03:28:27 +0000 (20:28 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 28 Sep 2010 03:28:27 +0000 (20:28 -0700)
r=timello, a=mkanat

Bugzilla/Bug.pm

index 93269d4806c1b59fcddedff544f21d6047f5614d..4219664f24f60184b79c6a22b4333dd2bf76c0d5 100644 (file)
@@ -2780,6 +2780,11 @@ sub add_see_also {
     my ($self, $input) = @_;
     $input = trim($input);
 
+    if (!$input) {
+        ThrowCodeError('param_required',
+                       { function => 'add_see_also', param => '$input' });
+    }
+
     # We assume that the URL is an HTTP URL if there is no (something):// 
     # in front.
     my $uri = new URI($input);