From 7e6a738d29e71c9f37171dd04690a764ad8fd7f5 Mon Sep 17 00:00:00 2001 From: FARRUGIA Date: Thu, 3 Jan 2019 11:01:08 +0100 Subject: [PATCH 1/2] fix a fatal error on an other package --- Slim/App.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Slim/App.php b/Slim/App.php index c8b01ec34..5ba6580e2 100644 --- a/Slim/App.php +++ b/Slim/App.php @@ -453,7 +453,7 @@ public function respond(ResponseInterface $response) $settings = $this->container->get('settings'); $chunkSize = $settings['responseChunkSize']; - $contentLength = $response->getHeaderLine('Content-Length'); + $contentLength = (int)$response->getHeaderLine('Content-Length'); if (!$contentLength) { $contentLength = $body->getSize(); } From 1bd7ef2b2c00d8726e8f53fc0eeb43a9e47fd44b Mon Sep 17 00:00:00 2001 From: FARRUGIA Date: Thu, 3 Jan 2019 13:03:38 +0100 Subject: [PATCH 2/2] Update fix --- Slim/App.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Slim/App.php b/Slim/App.php index 5ba6580e2..a07ffef16 100644 --- a/Slim/App.php +++ b/Slim/App.php @@ -453,7 +453,7 @@ public function respond(ResponseInterface $response) $settings = $this->container->get('settings'); $chunkSize = $settings['responseChunkSize']; - $contentLength = (int)$response->getHeaderLine('Content-Length'); + $contentLength = $response->getHeaderLine('Content-Length'); if (!$contentLength) { $contentLength = $body->getSize(); } @@ -473,7 +473,7 @@ public function respond(ResponseInterface $response) } } else { while (!$body->eof()) { - echo $body->read($chunkSize); + echo $body->read((int)$chunkSize); if (connection_status() != CONNECTION_NORMAL) { break; }