Make CloudStorageTools::createUploadUrl compatible with PHP7#13
Open
goodevilgenius wants to merge 3 commits intoGoogleCloudPlatform:masterfrom
Open
Make CloudStorageTools::createUploadUrl compatible with PHP7#13goodevilgenius wants to merge 3 commits intoGoogleCloudPlatform:masterfrom
goodevilgenius wants to merge 3 commits intoGoogleCloudPlatform:masterfrom
Conversation
`createUploadUrl` calls `getUploadMaxFileSizeInBytes`, which does the following operation on a mostly-numeric string: `$val *= 1024` In PHP5, this works fine, because non-numerica value is stripped from the end. In PHP7, a warning is issued which states `A non well formed numeric value encountered`. The value has a final non-numeric character which can be stripped to prevent this warning. This will continue to function in PHP5 as well. Fixes GoogleCloudPlatform#10
added 2 commits
March 20, 2018 11:31
This is testing a third-party library, anyhow.
b380298 to
070f503
Compare
|
I'm currently facing this issue, may I know what the status is for it? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
createUploadUrlcallsgetUploadMaxFileSizeInBytes, which does the following operation on a mostly-numeric string:$val *= 1024In PHP5, this works fine, because non-numeric values are stripped from the end.
In PHP7, a warning is issued which states
A non well formed numeric value encountered.The value has a final non-numeric character which can be stripped to prevent this warning.
This will continue to function in PHP5 as well.
Fixes #10
Other changes were necessary simply to get the build to pass.