]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/Common.pm
Return 404 when a bug number that does not exist is used
[debbugs.git] / Debbugs / Common.pm
index a444a469d432a258556c8c9cf7436d406f94593a..87b355924458444536aff9a27c2a1d3a52ee593e 100644 (file)
@@ -162,6 +162,8 @@ sub get_hashname {
 
 Returns the path to the logfile corresponding to the bug.
 
+Returns undef if the bug does not exist.
+
 =cut
 
 sub buglog {
@@ -169,7 +171,8 @@ sub buglog {
     my $location = getbuglocation($bugnum, 'log');
     return getbugcomponent($bugnum, 'log', $location) if ($location);
     $location = getbuglocation($bugnum, 'log.gz');
-    return getbugcomponent($bugnum, 'log.gz', $location);
+    return getbugcomponent($bugnum, 'log.gz', $location) if ($location);
+    return undef;
 }