diff options
author | David Lawrence <dkl@mozilla.com> | 2014-09-18 19:03:55 +0200 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2014-09-18 19:03:55 +0200 |
commit | 917ede930a27180b6e6adeb16a46efc8156d36cc (patch) | |
tree | 88b7d2a2981ce782d48f2eeb6eb01bc6ef3f32fb | |
parent | c07333d9c122bd6751e31dae5a7c49901f6518b2 (diff) | |
download | bugzilla-917ede930a27180b6e6adeb16a46efc8156d36cc.tar.gz bugzilla-917ede930a27180b6e6adeb16a46efc8156d36cc.tar.xz |
Bug 829273: Certain webservice tests failing due to improper error being thrown for undef or empty bug id values
r=glob,a=glob
-rw-r--r-- | Bugzilla/Bug.pm | 4 |
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; |