Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Bug fix: Ensure integer is passed to read() #2558
Firstly sorry for my English, I'm French.
You use Zend\Diactoros\Stream@read where you send the parameter $length being a string (even if this one contains a number like "138") and when fread is called - a few lines later - a fatal error is triggered.
This is why I purpose this fix.
https://github.com/slimphp/Slim/blob/3.x/Slim/App.php#L277 is a comment just above the definition of
Sorry, I fix the the filename in my previous comment => https://github.com/zendframework/zend-diactoros/blob/master/src/Stream.php#L277
My main concern is that
$data = $body->read(min((int)$chunkSize, (int)$amountToRead));
already casts to
Could possibly be an
$chunkSize = $settings['responseChunkSize'];
needs the cast?