Skip to content

Commit

Permalink
explicitly cast content length to int
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed Aug 8, 2017
1 parent d5aa289 commit 40801fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Sapi.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static function sendResponse(ResponseInterface $response) {
if (is_resource($body) && get_resource_type($body) == 'stream') {
if (PHP_INT_SIZE !== 4){
// use the dedicated function on 64 Bit systems
stream_copy_to_stream($body, $output, $contentLength);
stream_copy_to_stream($body, $output, (int)$contentLength);
} else {
// workaround for 32 Bit systems to avoid stream_copy_to_stream
while (!feof($body)) {
Expand Down

0 comments on commit 40801fa

Please sign in to comment.