Patch Valid::ip to work with PHP v7.0.10+ AND v5.6.25+#699
Closed
enov wants to merge 2 commits into3.3/developfrom
Closed
Patch Valid::ip to work with PHP v7.0.10+ AND v5.6.25+#699enov wants to merge 2 commits into3.3/developfrom
enov wants to merge 2 commits into3.3/developfrom
Conversation
classes/Kohana/Valid.php
Outdated
|
|
||
| $is_valid_public_ip = (bool) filter_var($ip, FILTER_VALIDATE_IP, $flags); | ||
|
|
||
| if ( ! $allow_private) |
There was a problem hiding this comment.
Please keep this if ($allow_private === FALSE) for backwards compatibility. What if someone does:
Valid::ip('ip', null);|
@enov I'm missing tests if possible. :) |
Contributor
Author
Contributor
Author
|
Please do not merge this, as it might be solved in the next minor versions of PHP php/php-src#2113 |
Contributor
Author
|
Fixed in PHP. |
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.
In a breaking change, php/php-src#1954 added
FILTER_FLAG_NO_PRIV_RANGEtoFILTER_FLAG_NO_RES_RANGE.The patch looks awful. Let me know if there is any better way to fix this.
Cheers!