EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
remove curl_close
Yurii67a51eb5a76f
diff --git a/application/Espo/Classes/TemplateHelpers/GoogleMaps.php b/application/Espo/Classes/TemplateHelpers/GoogleMaps.phpindex 7a458a2f27..f0526d80ab 100644--- a/application/Espo/Classes/TemplateHelpers/GoogleMaps.php+++ b/application/Espo/Classes/TemplateHelpers/GoogleMaps.php@@ -214,8 +214,6 @@ class GoogleMaps implements Helper$raw = curl_exec($c);- curl_close($c);-return $raw;}}diff --git a/application/Espo/Core/Authentication/Oidc/KeysProvider.php b/application/Espo/Core/Authentication/Oidc/KeysProvider.phpindex 893a807dcd..70dfb1158a 100644--- a/application/Espo/Core/Authentication/Oidc/KeysProvider.php+++ b/application/Espo/Core/Authentication/Oidc/KeysProvider.php@@ -119,8 +119,6 @@ class KeysProvider$error = curl_error($curl);$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);- curl_close($curl);-if ($response === false) {$response = '';}diff --git a/application/Espo/Core/Authentication/Oidc/Login.php b/application/Espo/Core/Authentication/Oidc/Login.phpindex c6c54526ee..ea44ab23e5 100644--- a/application/Espo/Core/Authentication/Oidc/Login.php+++ b/application/Espo/Core/Authentication/Oidc/Login.php@@ -253,8 +253,6 @@ class Login implements LoginInterface$error = curl_error($curl);$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);- curl_close($curl);-if ($response === false) {$response = '';}diff --git a/application/Espo/Core/Authentication/Oidc/UserInfoDataProvider.php b/application/Espo/Core/Authentication/Oidc/UserInfoDataProvider.phpindex 5f759851f0..5347ff4ead 100644--- a/application/Espo/Core/Authentication/Oidc/UserInfoDataProvider.php+++ b/application/Espo/Core/Authentication/Oidc/UserInfoDataProvider.php@@ -85,8 +85,6 @@ class UserInfoDataProvider$error = curl_error($curl);$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);- curl_close($curl);-if ($response === false) {$response = '';}diff --git a/application/Espo/Core/Console/Commands/Upgrade.php b/application/Espo/Core/Console/Commands/Upgrade.phpindex 5bdff1fe4d..048c059fa0 100644--- a/application/Espo/Core/Console/Commands/Upgrade.php+++ b/application/Espo/Core/Console/Commands/Upgrade.php@@ -444,8 +444,6 @@ class Upgrade implements Command$result = curl_exec($ch);- curl_close($ch);-try {$data = json_decode($result); /** @phpstan-ignore-line */} catch (Exception) { /** @phpstan-ignore-line */@@ -493,7 +491,6 @@ class Upgrade implements Commandcurl_setopt_array($ch, $options);curl_exec($ch);- curl_close($ch);}if (!$this->fileManager->isFile($localFilePath)) {diff --git a/application/Espo/Core/ExternalAccount/OAuth2/Client.php b/application/Espo/Core/ExternalAccount/OAuth2/Client.phpindex 28da1057be..db6a97823c 100644--- a/application/Espo/Core/ExternalAccount/OAuth2/Client.php+++ b/application/Espo/Core/ExternalAccount/OAuth2/Client.php@@ -389,8 +389,6 @@ class Client$resultArray = json_decode($responseBody, true);- curl_close($ch);-/** @var array<string, mixed>|string $result */$result = ($resultArray !== null) ?$resultArray :diff --git a/application/Espo/Tools/AdminNotifications/LatestReleaseDataRequester.php b/application/Espo/Tools/AdminNotifications/LatestReleaseDataRequester.phpindex 2b89b8ebef..1841faf82c 100644--- a/application/Espo/Tools/AdminNotifications/LatestReleaseDataRequester.php+++ b/application/Espo/Tools/AdminNotifications/LatestReleaseDataRequester.php@@ -64,8 +64,6 @@ class LatestReleaseDataRequester$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);- curl_close($ch);-if ($result === false) {return null;}diff --git a/application/Espo/Tools/Attachment/UploadUrlService.php b/application/Espo/Tools/Attachment/UploadUrlService.phpindex 567db3b700..36998613c9 100644--- a/application/Espo/Tools/Attachment/UploadUrlService.php+++ b/application/Espo/Tools/Attachment/UploadUrlService.php@@ -152,8 +152,6 @@ class UploadUrlService$response = curl_exec($ch);if ($response === false) {- curl_close($ch);-return null;}@@ -185,8 +183,6 @@ class UploadUrlService$type = $this->mimeType->getMimeTypeByExtension($extension);}- curl_close($ch);-if (!$type) {return null;}diff --git a/application/Espo/Tools/Captcha/Checker.php b/application/Espo/Tools/Captcha/Checker.phpindex 0d042e4e11..41f571aa2d 100644--- a/application/Espo/Tools/Captcha/Checker.php+++ b/application/Espo/Tools/Captcha/Checker.php@@ -92,8 +92,6 @@ class Checkerthrow new RuntimeException($message);}- curl_close($ch);-$responseData = Json::decode($response, true);if (!is_array($responseData)) {diff --git a/tests/integration/Core/ApiClient.php b/tests/integration/Core/ApiClient.phpindex 91d33c355f..f6c627e2f1 100644--- a/tests/integration/Core/ApiClient.php+++ b/tests/integration/Core/ApiClient.php@@ -131,7 +131,6 @@ class ApiClient$parsedResponse = $this->parseResponse($lastResponse);if ($this->getResponseHttpCode() == 200 && !empty($parsedResponse['body'])) {- curl_close($ch);return json_decode($parsedResponse['body'], true);}@@ -139,7 +138,6 @@ class ApiClient$errorCode = $this->getResponseHttpCode();$errorMessage = !empty($header['X-Status-Reason']) ? $header['X-Status-Reason'] : $errorCode;- curl_close($ch);throw new \Exception($errorMessage, $errorCode);}