diff --git a/ext/curl/curl.c b/ext/curl/curl.c index d46c6b21905..f9f85c4281b 100644 --- a/ext/curl/curl.c +++ b/ext/curl/curl.c @@ -534,6 +534,10 @@ PHP_FUNCTION(curl_setopt) SEPARATE_ZVAL(current); convert_to_string_ex(current); + if (Z_STRLEN_PP(current) < 1) { + continue; + } + indiv_command = estrndup(Z_STRVAL_PP(current), Z_STRLEN_PP(current)); commands = curl_slist_append(commands, indiv_command); if (!commands) {