Skip to content

Remove deprecated curl_close calls#110

Merged
loks0n merged 2 commits intomainfrom
codex/remove-curl-close-php85
Apr 29, 2026
Merged

Remove deprecated curl_close calls#110
loks0n merged 2 commits intomainfrom
codex/remove-curl-close-php85

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

What does this PR do?

Removes calls to curl_close(). Since PHP 8.0, cURL handles are CurlHandle objects and curl_close() no longer has an effect; handles are released by object lifetime instead. Removing these calls avoids noisy PHP 8.5 deprecation warnings without changing behavior for supported PHP versions.

Test Plan

  • Ran php -l on changed PHP files where applicable.
  • Confirmed no curl_close(...) calls remain in this repository.

Related PRs and Issues

N/A

Have you read the Contributing Guidelines on issues?

Yes.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR removes the curl_close($ch) call (and its //close connection comment) from ReCaptcha::check(). Since PHP 8.0 cURL handles are CurlHandle objects freed automatically at end-of-scope, the call was a no-op and is deprecated in PHP 8.5. The change is correct and has no behavioral impact.

Confidence Score: 5/5

Safe to merge — purely removes a deprecated no-op call with no behavioral change.

Single-line deletion of a function that has been a no-op since PHP 8.0. No logic, data, or security implications. No new issues introduced.

No files require special attention.

Important Files Changed

Filename Overview
src/Abuse/Adapters/ReCaptcha.php Removes the now-deprecated curl_close($ch) call and its inline comment; no logic change, correct for PHP 8.0+.

Reviews (2): Last reviewed commit: "Clean up curl_close removal formatting" | Re-trigger Greptile

Comment thread src/Abuse/Adapters/ReCaptcha.php Outdated
@loks0n loks0n merged commit 53f4274 into main Apr 29, 2026
7 checks passed
@loks0n loks0n deleted the codex/remove-curl-close-php85 branch April 29, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants