Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions include/lib_jira.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ function jira_new_issue_create($data){

$response = curl_exec($ch);
$ch_error = curl_error($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

curl_close($ch);
if ($ch_error){
if ($ch_error || $httpcode >= 400){
// echo "cURL Error: $ch_error";
return array(
"ok" => false,
Expand Down Expand Up @@ -81,7 +83,9 @@ function jira_new_issue_get($epic){

$response = curl_exec($ch);
$ch_error = curl_error($ch);
if ($ch_error){
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

if ($ch_error || $httpcode >= 400){
// echo "cURL Error: $ch_error";
curl_close($ch);
return array(
Expand Down Expand Up @@ -134,8 +138,9 @@ function jira_new_issue_add_checklistitem($issue_id, $customfield_id, $checklist

$response = curl_exec($ch);
$ch_error = curl_error($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

if ($ch_error){
if ($ch_error || $httpcode >= 400){
// echo "cURL Error: $ch_error";
curl_close($ch);
return array(
Expand Down