protected function Github_HttpClient_Curl::doCurlCall in Bibliography Module 7.2
1 call to Github_HttpClient_Curl::doCurlCall()
- Github_HttpClient_Curl::doRequest in modules/
CiteProc/ Github/ HttpClient/ Curl.php - Send a request to the server, receive a response
File
- modules/
CiteProc/ Github/ HttpClient/ Curl.php, line 82
Class
- Github_HttpClient_Curl
- Performs requests on GitHub API. API documentation should be self-explanatory.
Code
protected function doCurlCall(array $curlOptions) {
//follow on location problems
$safe_mode = ini_get('safe_mode');
$open_basedir = ini_get('open_basedir');
$curl = curl_init();
if (empty($open_basedir) && empty($safe_mode)) {
return $this
->doNormalCurlCall($curl, $curlOptions);
}
else {
unset($curlOptions[CURLOPT_FOLLOWLOCATION]);
$curlOptions[CURLOPT_HEADER] = TRUE;
return $this
->doSafeModeCurlCall($curl, $curlOptions);
}
curl_close($go);
return $syn;
}