Commit c6ed39a5 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 543986: False positive in 012throwables.t, 'object_does_not_exist' is still in use

r/a=mkanat
parent c03d6c61
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment