Skip to content

Commit 048d96d

Browse files
author
Kraev Alexander
committed
Fix broken file uploads with php version < 5.4
1 parent a12837e commit 048d96d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Jira/Api/Client/CurlClient.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ public function sendRequest($method, $url, $data = array(), $endpoint, Authentic
7171
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
7272
curl_setopt($curl, CURLOPT_VERBOSE, $debug);
7373
if ($isFile) {
74-
curl_setopt($curl, CURLOPT_SAFE_UPLOAD, false);
74+
if (defined('CURLOPT_SAFE_UPLOAD')) {
75+
curl_setopt($curl, CURLOPT_SAFE_UPLOAD, false);
76+
}
7577
curl_setopt($curl, CURLOPT_HTTPHEADER, array('X-Atlassian-Token: nocheck'));
7678
} else {
7779
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: application/json;charset=UTF-8"));

0 commit comments

Comments
 (0)