Open rowp opened 10 years ago
I have a very simple fix that does the job, feel free to improve it. BCMAPI.php on Line ~ 1350, curlRequest method :
private function curlRequest($request, $get_request = FALSE)
{
$curl = curl_init();
if($get_request)
{
curl_setopt($curl, CURLOPT_URL, $request);
} else {
curl_setopt($curl, CURLOPT_URL, $this->getUrl('write'));
curl_setopt($curl, CURLOPT_POST, 1);
+ if (!empty($request['file'])) {
+ $file = substr($request['file'], 1);
+ $request['file'] = new CURLFile($file);
+ }
curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
}
// ...
}
Since upgrade to PHP 5.5 there are some depreciated CURL functions.
Exception 'ErrorException' with message 'curl_setopt(): The usage of the @filename API for file uploading is deprecated. Please use the CURLFile class instead'
Is there a fix?