Skip to content

Commit cdccc18

Browse files
authored
Merge pull request #82 from snickom/master
Fix for another curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
2 parents e781bbd + df7f1b3 commit cdccc18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/JiraClient.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,10 @@ private function createUploadHandle($url, $upload_file)
279279
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $this->getConfiguration()->isCurlOptSslVerifyHost());
280280
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->getConfiguration()->isCurlOptSslVerifyPeer());
281281

282-
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
282+
// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); cannot be activated when an open_basedir is set
283+
if (!function_exists('ini_get') || !ini_get('open_basedir')){
284+
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
285+
}
283286
curl_setopt($ch, CURLOPT_HTTPHEADER,
284287
array(
285288
'Accept: */*',

0 commit comments

Comments
 (0)