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

Use intdiv where appropriate to prevent unexpected conversion to float. #1100

Merged
merged 1 commit into from
Jul 25, 2021
Merged

Use intdiv where appropriate to prevent unexpected conversion to float. #1100

merged 1 commit into from
Jul 25, 2021

Conversation

Favorlock
Copy link
Contributor

While using Telescope Toolbar I noticed that I couldn't view some of the profiles, so upon checking the request response on the Telescope dashboard it said Purged By Telescope.

I set TELESCOPE_RESPONSE_SIZE_LIMIT to some something really big and was still getting the same behavior. With some debugging I discovered that the check mb_strlen($content) / 1000 was giving a float as the result rather than an int.

Setting TELESCOPE_RESPONSE_SIZE_LIMIT to a float fixed the issue, however, I don't imagine this is the expected behavior. As such we can fix this issue by using the intdiv function.

@taylorotwell taylorotwell merged commit 32fdcb3 into laravel:4.x Jul 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants