Skip to content
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

fixed bug: type error on large zip download, argument 2 passed to OC\… #15210

Closed
wants to merge 1 commit into from

Conversation

TheRealDonDisco
Copy link

I fixed a smaller bug which raised a type error exception. It had been caused when downloading a large folder using the Streamer. The exception was: "Argument 2 passed to OC\Streamer::__construct() must be of the type integer, float given"

…Streamer must be of the type integer, float given
@kesselb
Copy link
Contributor

kesselb commented Apr 25, 2019

Ref #14336
Ref #13160

Bad idea. If you running nextcloud on a raspberry pi (and use a 32bit operating system) files larger than ~4gb are to big for int. What is wrong here is the typed return type.

@kesselb kesselb requested review from rullzer, ChristophWurst and icewind1991 and removed request for ChristophWurst April 25, 2019 09:57
@kesselb kesselb added 3. to review Waiting for reviews bug labels Apr 25, 2019
@kesselb kesselb added this to the Nextcloud 17 milestone Apr 25, 2019
@ChristophWurst
Copy link
Member

The $size param determines the number of bytes. How could that ever be a float?

@rullzer
Copy link
Member

rullzer commented May 11, 2019

@TheRealDonDisco on what hardware are you using your system?

I guess indeed the issue here is the 32bits. But moving this to float brings a whole buch of other isues on those systems.

@TheRealDonDisco
Copy link
Author

Yes, this is correct, i saw that issue on my 32 bit raspberry pi system. But i did not see any other issues coming along with my fix. I was also wondering like @ChristophWurst how the size param could ever be a float. With that change, it is also not possible to download files bigger than 4 GB (which is because of the 32 bit build) but to download all files in one folder as a zip which are smaller than 4 GB

@MorrisJobke MorrisJobke mentioned this pull request Jul 15, 2019
28 tasks
@rullzer rullzer removed this from the Nextcloud 17 milestone Aug 15, 2019
@kesselb
Copy link
Contributor

kesselb commented Sep 28, 2019

Superseded by #16636

It's better the remove the type hint instead of type hinting it wrong.

@kesselb kesselb closed this Sep 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants