I use OC_Util::getUrlContent for retrieving data from another server. This
method always return false and i don't know why it happens beacuse method
only returns $data.

Maybe it will be usefull to return an exception if there is error in
response?
Like this:
$data = curl_exec($curl);
if (false === $data){
    throw new Exception(curl_error($curl), curl_errno($curl));
}
Or some specific exception type.
Only with this change i understand that i have another problem:
"SSL certificate problem: unable to get local issuer certificate" in
exception, because i have https url.
I need have this in curl options:
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
I don't send any passwords or user data, so i don't need any additional
checks. But i can't change this method, only copy and paste it in my
application.

Maybe some part of this implement in standard OC_Util::getUrlContent,
because only false in response little bit discouraged.
_______________________________________________
Owncloud mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/owncloud

Reply via email to