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

Remove warnings from inet_pton()/inet_ntop() #3200

Merged
merged 1 commit into from Apr 3, 2018

Conversation

3 participants
@DaveRandom
Copy link
Contributor

commented Mar 29, 2018

This patch removes the warnings emitted by inet_ntop()/inet_pton() as they do not impart any useful information not already available to userland, and superfluous warnings can cause debugging problems. These functions are frequently used as a quick mechanism to validate data from external sources along with normalization and conversion, so it is reasonable to expect that bad input may be supplied and this should not be considered exceptional.

This patch targets 7.1, as the fact that these functions emit warnings is not documented and the warnings do not affect the required userland logic - the return value still needs to be checked for failures.

Updated to target master.

@DaveRandom DaveRandom force-pushed the DaveRandom:remove-inet-errors branch from 788bd90 to 2f4d7fd Mar 29, 2018

@bukka

This comment has been minimized.

Copy link
Member

commented Mar 29, 2018

Couldn't this be an issue for apps that convert warnings to exceptions and might relay on exception to be thrown? The fact that it's not documented doesn't mean that it can't break anything... :) We have got bunch of stuff not documented...

+1 for master though...

@DaveRandom

This comment has been minimized.

Copy link
Contributor Author

commented Mar 30, 2018

@bukka reluctantly agreed, will re-target master and merge

@DaveRandom DaveRandom force-pushed the DaveRandom:remove-inet-errors branch from 2f4d7fd to ae90c7a Mar 30, 2018

@DaveRandom DaveRandom changed the base branch from PHP-7.1 to master Mar 30, 2018

@DaveRandom DaveRandom force-pushed the DaveRandom:remove-inet-errors branch from ae90c7a to 822b47c Apr 1, 2018

@DaveRandom DaveRandom force-pushed the DaveRandom:remove-inet-errors branch from 822b47c to 658a23a Apr 3, 2018

@php-pulls php-pulls merged commit 658a23a into php:master Apr 3, 2018

0 of 4 checks passed

continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.