Skip to content

Conversation

@devnexen
Copy link
Member

we check the FCC is properly initialised beforehand.

we check the FCC is properly initialised beforehand in its handler.
@devnexen devnexen marked this pull request as ready for review January 24, 2026 15:46
@devnexen devnexen requested a review from adoy as a code owner January 24, 2026 15:46
@devnexen devnexen requested a review from Girgias January 24, 2026 17:38
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_NOPROGRESS, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_XFERINFOFUNCTION, $callback);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION are aliases... should we deprecate one, or explicitly mark one constant as the alias of the other?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PROGRESS is the one to be deprecated, we should at some point before next major release IMHO

Comment on lines +656 to +657
return rval;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really understand how this can happen. It shouldn't be possible for this state to arise as this condition should be caught by the HANDLE_CURL_OPTION_CALLABLE, no? Or am I missing something here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no it is not, when I debugged php_curl_set_callable_handler earlier, the fcc was not initialised despite being succesful.

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_NOPROGRESS, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_XFERINFOFUNCTION, $callback);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
curl_setopt($ch, CURLOPT_XFERINFOFUNCTION, $callback);
curl_setopt($ch, CURLOPT_XFERINFOFUNCTION, null);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid it is not the same as here, it s an undefined var.

curl_exec($ch);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, $callback);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, $callback);
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, null);

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.

SEGV at zend_call_known_fcc Zend/zend_API.h

2 participants