]> granicus.if.org Git - php/commitdiff
Fix #66562: Consistency bug where curl_multi_getcontent behaves different from curl_exec
authorFreek <freek.lijten@procurios.nl>
Tue, 28 Jan 2014 10:47:14 +0000 (11:47 +0100)
committerFreek <freek.lijten@procurios.nl>
Tue, 28 Jan 2014 10:47:14 +0000 (11:47 +0100)
curl_exec returns an empty string when data is received from a domain that returns zero content. curl_multi_getcontent
returned null. Now it returns an empty string fixing the incosistency

ext/curl/multi.c

index e5c026a513159c375017e42cabe82329e7706789..9fbea5518f8dab402ecbe8cacb40101fa7f61a60 100644 (file)
@@ -248,6 +248,8 @@ PHP_FUNCTION(curl_multi_getcontent)
                smart_str_0(&ch->handlers->write->buf);
                RETURN_STRINGL(ch->handlers->write->buf.c, ch->handlers->write->buf.len, 1);
        }
+
+        RETURN_EMPTY_STRING();
 }
 /* }}} */