diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2010-02-05 22:58:57 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2010-02-05 22:58:57 +0100 |
commit | c6ed39a5865c67088bc7cebdc9939bddd08a1074 (patch) | |
tree | 80be6a6f8e000e58fd564fb97241cd9ea8dd817e /Bugzilla | |
parent | c03d6c616c09f3fbe8eb9336638a71645e17d2c7 (diff) | |
download | bugzilla-c6ed39a5865c67088bc7cebdc9939bddd08a1074.tar.gz bugzilla-c6ed39a5865c67088bc7cebdc9939bddd08a1074.tar.xz |
Bug 543986: False positive in 012throwables.t, 'object_does_not_exist' is still in use
r/a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Object.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm index 4ee362945..0bb865ea6 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; } |