From 5558d0db9b88a1975b40d4beb5db863c7d87e3c0 Mon Sep 17 00:00:00 2001 From: Freek Date: Tue, 28 Jan 2014 11:47:14 +0100 Subject: [PATCH] Fix #66562: Consistency bug where curl_multi_getcontent behaves different from curl_exec 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 --- NEWS | 4 ++++ ext/curl/multi.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index a059e075f2..c6522aea91 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,10 @@ PHP NEWS . Fixed bug #67024 (getimagesize should recognize BMP files with negative height). (Gabor Buella) +- cURL: + . Fixed bug #66562 (curl_exec returns differently than curl_multi_getcontent). + (Freek Lijten) + - Date: . Fixed bug #66721 (__wakeup of DateTime segfaults when invalid object data is supplied). (Boro Sitnikovski) diff --git a/ext/curl/multi.c b/ext/curl/multi.c index a990dad2f2..c0985e5646 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -253,6 +253,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(); } /* }}} */ -- 2.50.1