Also show the message of curl_error() when curl_exec() fails, this way
it's easier to diagnose problems.
CURLOPT_USERAGENT => Tweeper::$userAgent,
));
$contents = curl_exec($ch);
CURLOPT_USERAGENT => Tweeper::$userAgent,
));
$contents = curl_exec($ch);
+ if (FALSE === $contents) {
+ trigger_error(curl_error($ch));
+ }
curl_close($ch);
return $contents;
curl_close($ch);
return $contents;
));
curl_exec($ch);
$url_info = curl_getinfo($ch);
));
curl_exec($ch);
$url_info = curl_getinfo($ch);
+ if (FALSE === $url_info) {
+ trigger_error(curl_error($ch));
+ }
curl_close($ch);
return $url_info;
curl_close($ch);
return $url_info;