X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_encoding.c;h=a1667fc0fdc645be68540c69cf75fc670ccdb40e;hb=565b1721506d335bd2fc8b52126b3827eb7212e4;hp=4a71c80074d24f1ea902a641df09810c13653312;hpb=d5de4f9eae86ae1dab0f8a906bf9543710ae124d;p=m6w6%2Fext-http diff --git a/php_http_encoding.c b/php_http_encoding.c index 4a71c80..a1667fc 100644 --- a/php_http_encoding.c +++ b/php_http_encoding.c @@ -1061,7 +1061,11 @@ PHP_METHOD(HttpEncodingStream, flush) size_t encoded_len; if (SUCCESS == php_http_encoding_stream_flush(obj->stream, &encoded_str, &encoded_len)) { - RETURN_STRINGL(encoded_str, encoded_len, 0); + if (encoded_str) { + RETURN_STRINGL(encoded_str, encoded_len, 0); + } else { + RETURN_EMPTY_STRING(); + } } } }