Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions commands/download.bee.inc
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,9 @@ function download_bee_download_project($project, $source_url, $destination, $bra
curl_setopt($curl_handle, CURLOPT_USERAGENT, BEE_USERAGENT);
curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, TRUE);
curl_exec($curl_handle);
curl_close($curl_handle);
if (version_compare(PHP_VERSION, '8.0') < 0) {
curl_close($curl_handle);
}
fclose($file_handle);

if (file_exists($file)) {
Expand Down Expand Up @@ -1276,7 +1278,9 @@ function download_bee_github_api_call($endpoint, $github_api_token = '', $reques

// Execute and close the curl request.
$response = curl_exec($curl_handle);
curl_close($curl_handle);
if (version_compare(PHP_VERSION, '8.0') < 0) {
curl_close($curl_handle);
}

// Process the output according to the request type.
switch ($request_type) {
Expand Down Expand Up @@ -1325,7 +1329,9 @@ function download_bee_check_url_exists($url) {
$return_code = curl_getinfo($curl_handle, CURLINFO_RESPONSE_CODE);

// Close the curl request.
curl_close($curl_handle);
if (version_compare(PHP_VERSION, '8.0') < 0) {
curl_close($curl_handle);
}

// Return the result.
return $return_code == 200;
Expand Down Expand Up @@ -1363,7 +1369,9 @@ function download_bee_check_latest_release_exists($project, $organization) {
$effective_url = curl_getinfo($curl_handle, CURLINFO_EFFECTIVE_URL);

// Close the curl request.
curl_close($curl_handle);
if (version_compare(PHP_VERSION, '8.0') < 0) {
curl_close($curl_handle);
}

$no_latest_release_url = "https://github.com/$organization/$project/releases";
return $effective_url != $no_latest_release_url;
Expand Down
4 changes: 3 additions & 1 deletion includes/telemetry.inc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ function bee_telemetry_send() {
$response_headers = bee_get_headers_from_curl_response($response_header);

// Close the curl request.
curl_close($curl_handle);
if (version_compare(PHP_VERSION, '8.0') < 0) {
curl_close($curl_handle);
}

// Debug message of the header array.
bee_instant_message('Telemetry $response_headers:', 'debug', $response_headers);
Expand Down
Loading