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
2 changes: 1 addition & 1 deletion .github/workflows/test-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ["8.2", "8.3"]
php-versions: ["8.3", "8.5"]

name: test-master

Expand Down
4 changes: 0 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -611,12 +611,10 @@ private function fetchUpdateServerResponse(string $updateURL): array {

if ($response === false) {
$curlError = curl_error($curl);
curl_close($curl);
throw new \Exception('Could not do request to updater server: ' . $curlError);
}

$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

if ($httpCode !== 200 && $httpCode !== 204) {
$this->silentLog('[warn] update server returned HTTP ' . $httpCode);
Expand Down Expand Up @@ -789,7 +787,6 @@ private function downloadArchive(string $fromUrl, string $toLocation): bool {
fclose($fp);
unlink($toLocation);
$this->silentLog('[warn] fail to download archive from ' . $fromUrl . '. Error: ' . $httpCode . ' ' . curl_error($ch));
curl_close($ch);

return false;
}
Expand All @@ -798,7 +795,6 @@ private function downloadArchive(string $fromUrl, string $toLocation): bool {
$info = curl_getinfo($ch);
$this->silentLog('[info] download stats: size=' . $this->formatBytes((int)$info['size_download']) . ' bytes; total_time=' . round($info['total_time'], 2) . ' secs; avg speed=' . $this->formatBytes((int)$info['speed_download']) . '/sec');

curl_close($ch);
fclose($fp);

$this->silentLog('[info] end of downloadUpdate()');
Expand Down
4 changes: 0 additions & 4 deletions lib/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,12 +599,10 @@ private function fetchUpdateServerResponse(string $updateURL): array {

if ($response === false) {
$curlError = curl_error($curl);
curl_close($curl);
throw new \Exception('Could not do request to updater server: ' . $curlError);
}

$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

if ($httpCode !== 200 && $httpCode !== 204) {
$this->silentLog('[warn] update server returned HTTP ' . $httpCode);
Expand Down Expand Up @@ -777,7 +775,6 @@ private function downloadArchive(string $fromUrl, string $toLocation): bool {
fclose($fp);
unlink($toLocation);
$this->silentLog('[warn] fail to download archive from ' . $fromUrl . '. Error: ' . $httpCode . ' ' . curl_error($ch));
curl_close($ch);

return false;
}
Expand All @@ -786,7 +783,6 @@ private function downloadArchive(string $fromUrl, string $toLocation): bool {
$info = curl_getinfo($ch);
$this->silentLog('[info] download stats: size=' . $this->formatBytes((int)$info['size_download']) . ' bytes; total_time=' . round($info['total_time'], 2) . ' secs; avg speed=' . $this->formatBytes((int)$info['speed_download']) . '/sec');

curl_close($ch);
fclose($fp);

$this->silentLog('[info] end of downloadUpdate()');
Expand Down
2 changes: 0 additions & 2 deletions tests/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ public function theCurrentInstalledVersionIs($installed, $version) {
throw new \Exception('Download failed for ' . $url . ' - HTTP code: ' . $httpCode);
}

curl_close($ch);
fclose($fp);
}

Expand Down Expand Up @@ -237,7 +236,6 @@ public function theArchiveForVersionIsAvailableLocally(string $version): void {
throw new \Exception('Download failed for ' . $url . ' - HTTP code: ' . $httpCode);
}

curl_close($ch);
fclose($fp);
}
}
Expand Down
Binary file modified updater.phar
Binary file not shown.
Loading