From 917ede930a27180b6e6adeb16a46efc8156d36cc Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 18 Sep 2014 17:03:55 +0000 Subject: Bug 829273: Certain webservice tests failing due to improper error being thrown for undef or empty bug id values r=glob,a=glob --- Bugzilla/Bug.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Bug.pm') 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; -- cgit v1.2.3-24-g4f1b