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
[8.0] Update EasyHandle
in order to avoid bad writes of properties related to the handle
#2293
base: 8.0
Are you sure you want to change the base?
Conversation
9ff0a64
to
a1d7847
Compare
Thank you for the PR. |
The prevention is done in order to avoid the object to accept a set of inconsistent values, regardless who is writing them. In my specific use case, the situation was caused from a 3rd party library using Guzzle, but I don't have enough details since I think the problem was related to #2292. |
0975ccd
to
c782faf
Compare
src/Handler/CurlFactory.php
Outdated
@@ -147,7 +147,7 @@ private static function finishError( | |||
|
|||
// Retry when nothing is present or when curl failed to rewind. | |||
if (empty($easy->options['_err_message']) | |||
&& (!$easy->errno || $easy->errno == 65) | |||
&& (!$easy->errno || $easy->errno == /* CURLE_SEND_FAIL_REWIND */ 65) |
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.
When is this constant not set? Was added at least 10 years ago, wasn't it?
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 don't think so. See php/php-src#4079.
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.
Oh, I see. They never made it into PHP-land. ;)
7f8c70a
to
0998eab
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 2 weeks if no further activity occurs. Thank you for your contributions. |
8e43093
to
dd0ea36
Compare
2a25470
to
36c07f3
Compare
EasyHandle
in order to avoid bad writes of properties related to the handleEasyHandle
in order to avoid bad writes of properties related to the handle
@phansys are you able to resolve the merge conflicts please? |
c14b88a
to
229317f
Compare
Since this PR is almost 5 years old, I guess I must also update the behavior on some checks, since the added support for PHP >= 8 in the target branch also changed some return values in CURL functions (like |
ed9dfc1
to
2245ac1
Compare
src/Handler/EasyHandle.php
Outdated
} | ||
|
||
/** | ||
* @throws \LogicException |
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.
Where does it throw LogicException in __unset
?
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.
This exception isn't thrown in the current implementation. The docblock was updated, thank you.
267b28b
to
0e8c2ca
Compare
With these changes, setting fake values like this can be prevented.