From 31d1a728544f7ae740463cd0d1f345544175fcd2 Mon Sep 17 00:00:00 2001 From: Klaus Weidenbach Date: Thu, 6 Jul 2017 21:33:07 +0200 Subject: :arrow_up: Updating some PHP libraries. htmlpurifier (v4.9.2 => v4.9.3) with bugfix for PHP7.1 sabre/http (4.2.2 => 4.2.3) --- vendor/sabre/http/lib/Sapi.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'vendor/sabre/http/lib/Sapi.php') diff --git a/vendor/sabre/http/lib/Sapi.php b/vendor/sabre/http/lib/Sapi.php index 6c83c8719..6fc6452e4 100644 --- a/vendor/sabre/http/lib/Sapi.php +++ b/vendor/sabre/http/lib/Sapi.php @@ -75,7 +75,15 @@ class Sapi { if ($contentLength !== null) { $output = fopen('php://output', 'wb'); if (is_resource($body) && get_resource_type($body) == 'stream') { - stream_copy_to_stream($body, $output, $contentLength); + if (PHP_INT_SIZE !== 4){ + // use the dedicated function on 64 Bit systems + stream_copy_to_stream($body, $output, $contentLength); + } else { + // workaround for 32 Bit systems to avoid stream_copy_to_stream + while (!feof($body)) { + fwrite($output, fread($body, 8192)); + } + } } else { fwrite($output, $body, $contentLength); } -- cgit v1.2.3