summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2014-09-18 19:03:55 +0200
committerDavid Lawrence <dkl@mozilla.com>2014-09-18 19:03:55 +0200
commit917ede930a27180b6e6adeb16a46efc8156d36cc (patch)
tree88b7d2a2981ce782d48f2eeb6eb01bc6ef3f32fb /Bugzilla/Bug.pm
parentc07333d9c122bd6751e31dae5a7c49901f6518b2 (diff)
downloadbugzilla-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
Diffstat (limited to 'Bugzilla/Bug.pm')
-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;