summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Bug.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 3aba1774a..a92a7077b 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -312,8 +312,8 @@ sub new {
# If we get something that looks like a word (not a number),
# make it the "name" param.
if (!defined $param
- || (!ref($param) && $param =~ /\D/)
- || (ref($param) && $param->{id} =~ /\D/))
+ || (!ref($param) && $param !~ /^\d+$/)
+ || (ref($param) && $param->{id} !~ /^\d+$/))
{
if ($param) {
my $alias = ref($param) ? $param->{id} : $param;