summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-09-28 05:27:16 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-09-28 05:27:16 +0200
commit4e36bf4d55c01c35c1e62fc1e347d49d6c0326c3 (patch)
treefc278fb205020de5c7f790e53de256485879d20a
parentcef0de258d76ae39a892c1fcefd84d62b9b43e41 (diff)
downloadbugzilla-4e36bf4d55c01c35c1e62fc1e347d49d6c0326c3.tar.gz
bugzilla-4e36bf4d55c01c35c1e62fc1e347d49d6c0326c3.tar.xz
Bug 597772: Make add_see_also check for undef input
r=timello, a=mkanat
-rw-r--r--Bugzilla/Bug.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index ea84fddf5..1e2b78c9a 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -2795,6 +2795,11 @@ sub add_see_also {
my ($self, $input, $skip_recursion) = @_;
$input = trim($input);
+ if (!$input) {
+ ThrowCodeError('param_required',
+ { function => 'add_see_also', param => '$input' });
+ }
+
# If a bug id/alias has been taken, then treat it
# as a link to the local Bugzilla.
my $local_bug_uri = correct_urlbase() . "show_bug.cgi?id=";