Skip to content

Commit

Permalink
Merge pull request WordPress#230 from dd32/master
Browse files Browse the repository at this point in the history
Bail from cURL when either `curl_init()` OR `curl_exec()` are unavailable
  • Loading branch information
rmccue committed Aug 18, 2016
2 parents 1b5ffd8 + 26b195c commit fb5b517
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Requests/Transport/cURL.php
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ protected static function format_get($url, $data) {
* @return boolean True if the transport is valid, false otherwise.
*/
public static function test($capabilities = array()) {
if (!function_exists('curl_init') && !function_exists('curl_exec')) {
if (!function_exists('curl_init') || !function_exists('curl_exec')) {
return false;
}

Expand Down

0 comments on commit fb5b517

Please sign in to comment.