⬆️ Updating some PHP libraries.

htmlpurifier (v4.9.2 => v4.9.3) with bugfix for PHP7.1
sabre/http (4.2.2 => 4.2.3)
This commit is contained in:
Klaus Weidenbach
2017-07-06 21:33:07 +02:00
parent f9a989fe1b
commit 31d1a72854
15 changed files with 252 additions and 223 deletions

View File

@@ -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);
}