-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Make the return type of some stream context related functions true #12720
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
Conversation
Before the slight refactoring, it wasn't obvious that the related functions could only return true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified that the semantic change is right: all failure paths indeed throw an exception, so it is impossible to return true.
Found one mistake though.
Co-authored-by: Niels Dossche <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if CI is happy
|
||
try { | ||
stream_context_create(['ssl' => ['verify_peer'=> false]], ["options" => false]); | ||
} catch (ValueError $exception) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be a TypeError
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after test fix and if CI is then happy.
2fef794
to
9762421
Compare
Before the slight refactoring, it wasn't obvious that the related functions could only return true.