summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/BzAPI/Extension.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/extensions/BzAPI/Extension.pm b/extensions/BzAPI/Extension.pm
index 54a1dca0f..f233b26e4 100644
--- a/extensions/BzAPI/Extension.pm
+++ b/extensions/BzAPI/Extension.pm
@@ -161,7 +161,10 @@ sub webservice_rest_response {
# Add a Location header if a newly created resource
# such as a bug or comment.
- if ($rpc->bz_success_code == STATUS_CREATED && $$result->{ref}) {
+ if ($rpc->bz_success_code
+ && $rpc->bz_success_code == STATUS_CREATED
+ && $$result->{ref})
+ {
$response->header("Location", $$result->{ref});
}
}