From: Michael Wallner Date: Fri, 2 Aug 2019 11:15:33 +0000 (+0200) Subject: attempt to fix #91 X-Git-Tag: RELEASE_3_2_2~7 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=50eaea1dac2be9bff7990a6f669b5b6dacc6889e;ds=sidebyside attempt to fix #91 --- diff --git a/src/php_http_message_body.c b/src/php_http_message_body.c index 79c8bf7..b2e643b 100644 --- a/src/php_http_message_body.c +++ b/src/php_http_message_body.c @@ -214,7 +214,7 @@ size_t php_http_message_body_append(php_http_message_body_t *body, const char *b written = php_stream_write(s, buf, len); if (written != len) { - php_error_docref(NULL, E_WARNING, "Failed to append %zu bytes to body; wrote %zu", len, written); + php_error_docref(NULL, E_WARNING, "Failed to append %zu bytes to body; wrote %zu", len, written == (size_t) -1 ? 0 : written); } return len;