From: myk%mozilla.org <> Date: Thu, 29 Jan 2004 06:08:29 +0000 (+0000) Subject: Fix for bug 232447: Warns user about missing bug number instead of dying in GetBugLink(). X-Git-Tag: bugzilla-2.17.7~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe68a1cec650c4509c5ca83f460a4330e62c762f;p=thirdparty%2Fbugzilla.git Fix for bug 232447: Warns user about missing bug number instead of dying in GetBugLink(). r=justdave --- diff --git a/globals.pl b/globals.pl index b5f3b7e36d..825c30af78 100644 --- a/globals.pl +++ b/globals.pl @@ -1007,7 +1007,8 @@ sub GetAttachmentLink { sub GetBugLink { my ($bug_num, $link_text, $comment_num) = @_; - detaint_natural($bug_num) || die "GetBugLink() called with non-integer bug number"; + $bug_num || return "<missing bug number>"; + detaint_natural($bug_num) || return "<invalid bug number>"; # If we've run GetBugLink() for this bug number before, %::buglink # will contain an anonymous array ref of relevent values, if not