-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug fix: Ensure integer is passed to read() #2558
Conversation
Can you explain the problem you are having and why this fixes it? |
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. |
Which |
The fatal error is provoked in line ~277 of file " vendor/zendframework/zend-diactoros/src/Stream.php " =>
|
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 |
Ah! Which |
Sorry, I did not investigate enought to say it but I can search this if you want. |
My main concern is that $data = $body->read(min((int)$chunkSize, (int)$amountToRead)); already casts to echo $body->read($chunkSize); Could possibly be an $chunkSize = $settings['responseChunkSize']; needs the cast? |
This concern surely the line Also, you'are right => My previous commit does not fix this but my second commit must be fix the issue normally. Thanks for your patience. |
No description provided.