From: Anatol Belski Date: Sun, 14 Sep 2014 20:07:38 +0000 (+0200) Subject: better way to check for empty string X-Git-Tag: PRE_NATIVE_TLS_MERGE~158^2~85^2~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=635a23128b018b7cafcf17bdc7131585b9606352;p=php better way to check for empty string --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 1c7fe36c79..54a0abc3c9 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1832,10 +1832,10 @@ static void _php_curl_set_default_options(php_curl *ch) curl_easy_setopt(ch->cp, CURLOPT_MAXREDIRS, 20); /* prevent infinite redirects */ cainfo = INI_STR("openssl.cafile"); - if (!(cainfo && strlen(cainfo) > 0)) { + if (!(cainfo && cainfo[0] != '\0')) { cainfo = INI_STR("curl.cainfo"); } - if (cainfo && strlen(cainfo) > 0) { + if (cainfo && cainfo[0] != '\0') { curl_easy_setopt(ch->cp, CURLOPT_CAINFO, cainfo); }