Remove deprecated curl_close() calls for PHP 8.5+ compatibility

curl_close() is a no-op since PHP 8.0 (curl handles auto-cleanup as objects),
deprecated in 8.0, and generates warnings in 8.5. Removed from auto-updater
and FCM classes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude
2026-04-27 05:49:41 -07:00
parent 46fc27f9bf
commit fe8ddd51bb
2 changed files with 0 additions and 3 deletions

View File

@@ -177,7 +177,6 @@ class TWP_Auto_Updater {
$response = curl_exec($ch); $response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if (!$response || $http_code !== 200) { if (!$response || $http_code !== 200) {
error_log("TWP Auto-Updater: Gitea API returned status $http_code"); error_log("TWP Auto-Updater: Gitea API returned status $http_code");

View File

@@ -119,7 +119,6 @@ class TWP_FCM {
$response = curl_exec($ch); $response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($http_code !== 200) { if ($http_code !== 200) {
error_log("TWP FCM: Failed to send notification. HTTP $http_code: $response"); error_log("TWP FCM: Failed to send notification. HTTP $http_code: $response");
@@ -173,7 +172,6 @@ class TWP_FCM {
$response = curl_exec($ch); $response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($http_code !== 200) { if ($http_code !== 200) {
error_log("TWP FCM: Failed to get access token. HTTP $http_code: $response"); error_log("TWP FCM: Failed to get access token. HTTP $http_code: $response");