]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 232447: Warns user about missing bug number instead of dying in GetBugLink().
authormyk%mozilla.org <>
Thu, 29 Jan 2004 06:08:29 +0000 (06:08 +0000)
committermyk%mozilla.org <>
Thu, 29 Jan 2004 06:08:29 +0000 (06:08 +0000)
r=justdave

globals.pl

index b5f3b7e36d37e93dec498f4d7264a091fc0e95d8..825c30af7835edac3f156117bd61bd2c0c1fd0ad 100644 (file)
@@ -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 "&lt;missing bug number&gt;";
+    detaint_natural($bug_num) || return "&lt;invalid bug number&gt;";
 
     # If we've run GetBugLink() for this bug number before, %::buglink
     # will contain an anonymous array ref of relevent values, if not