summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-01-10 23:05:34 +0100
committerDave Lawrence <dlawrence@mozilla.com>2013-01-10 23:05:34 +0100
commit32a2d5fb62b8756297fc2be7d41599fe24bf7878 (patch)
treea0ceb47de9e0c67adf827c92070d142124e9f5ee /Bugzilla/Bug.pm
parentf7ff15c60c61f2691acaf2d9b8840b85545aa68a (diff)
downloadbugzilla-32a2d5fb62b8756297fc2be7d41599fe24bf7878.tar.gz
bugzilla-32a2d5fb62b8756297fc2be7d41599fe24bf7878.tar.xz
Bug 829273 - Certain webservice tests failing due to improper error being thrown for undef or empty bug id values
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 779ba59ab..81cb55a43 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -334,8 +334,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 || $param =~ /\D/))
+ || (ref($param) && (!$param->{id} || $param->{id} =~ /\D/)))
{
# But only if aliases are enabled.
if (Bugzilla->params->{'usebugaliases'} && $param) {