From: Frédéric Buclin Date: Fri, 5 Feb 2010 22:00:41 +0000 (+0100) Subject: Bug 543986: False positive in 012throwables.t, 'object_does_not_exist' is still in use X-Git-Tag: bugzilla-3.6rc1~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61e7b8310d58e1ae0a15ddb1b4a8796dedc36ad2;p=thirdparty%2Fbugzilla.git Bug 543986: False positive in 012throwables.t, 'object_does_not_exist' is still in use r/a=mkanat --- diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm index 4ee362945a..0bb865ea60 100644 --- a/Bugzilla/Object.pm +++ b/Bugzilla/Object.pm @@ -134,8 +134,12 @@ sub check { # We don't want to override the normal template "user" object if # "user" is one of the params. delete $param->{user}; - my $error = delete $param->{_error} || 'object_does_not_exist'; - ThrowUserError($error, { %$param, class => $class }); + if (my $error = delete $param->{_error}) { + ThrowUserError($error, { %$param, class => $class }); + } + else { + ThrowUserError('object_does_not_exist', { %$param, class => $class }); + } } return $obj; }