From fe8ddd51bb3287f777bd7a27e6b6152eb3f59d3b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 27 Apr 2026 05:49:41 -0700 Subject: [PATCH] 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) --- includes/class-twp-auto-updater.php | 1 - includes/class-twp-fcm.php | 2 -- 2 files changed, 3 deletions(-) diff --git a/includes/class-twp-auto-updater.php b/includes/class-twp-auto-updater.php index a09f4cf..46470f0 100644 --- a/includes/class-twp-auto-updater.php +++ b/includes/class-twp-auto-updater.php @@ -177,7 +177,6 @@ class TWP_Auto_Updater { $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); - curl_close($ch); if (!$response || $http_code !== 200) { error_log("TWP Auto-Updater: Gitea API returned status $http_code"); diff --git a/includes/class-twp-fcm.php b/includes/class-twp-fcm.php index 84a494e..9112ef6 100644 --- a/includes/class-twp-fcm.php +++ b/includes/class-twp-fcm.php @@ -119,7 +119,6 @@ class TWP_FCM { $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); - curl_close($ch); if ($http_code !== 200) { error_log("TWP FCM: Failed to send notification. HTTP $http_code: $response"); @@ -173,7 +172,6 @@ class TWP_FCM { $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); - curl_close($ch); if ($http_code !== 200) { error_log("TWP FCM: Failed to get access token. HTTP $http_code: $response");