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

ext/curl: Fix CURLOPT_PREREQFUNCTION to not continue on error conditions #16790

Open
wants to merge 1 commit into
base: PHP-8.4
Choose a base branch
from

Conversation

Ayesh
Copy link
Member

@Ayesh Ayesh commented Nov 14, 2024

This is a follow-up to GH-13255.

When the CURLOPT_PREREQFUNCTION callback does not return any value or return an invalid value, we throw a ValueError or a TypeError exception. However, it does not prevent the Curl request from going forward because our default return value is CURL_PREREQFUNC_OK.

This changes the default value to CURL_PREREQFUNC_ABORT.

…tions

This is a follow-up to phpGH-13255.

When the `CURLOPT_PREREQFUNCTION` callback does not return any value
or return an invalid value, we throw a `ValueError` or a `TypeError`
exception. However, it does not prevent the Curl request from going
forward because our default return value is `CURL_PREREQFUNC_OK`.

This changes the default value to `CURL_PREREQFUNC_ABORT`.
@cmb69
Copy link
Member

cmb69 commented Nov 14, 2024

Thank you! Looks good to me; can we test this?

Somewhat related: #16513.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants