From 7311e9fc521d47cea0ebde68534046b36ebd972b Mon Sep 17 00:00:00 2001 From: chevereto Date: Sat, 27 Apr 2024 20:56:57 +0000 Subject: [PATCH] Automatic push 4.1.1 --- .package/4.1.1.txt | 1 + app/upgrading.php | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.package/4.1.1.txt b/.package/4.1.1.txt index 2051d4d..aad804f 100644 --- a/.package/4.1.1.txt +++ b/.package/4.1.1.txt @@ -16,3 +16,4 @@ Chevereto 4.1.1 (2024-04-27) - 🐞 Fixed bug with not working URL upload - 🐞 Fixed bug with video upload not working on iOS - 🐞 Fixed bug with file-upload documentation link +- 🇨🇱 Updated Spanish translation \ No newline at end of file diff --git a/app/upgrading.php b/app/upgrading.php index 3a4d200..8221898 100644 --- a/app/upgrading.php +++ b/app/upgrading.php @@ -352,12 +352,13 @@ function downloadAction(string $workingDir, array $params): Response $zipBall = str_replace('%tag%', $tag, $zipBall); $isPost = true; $curl = downloadFile($zipBall, $params, $filePath, $isPost); - - throw new RuntimeException( - $curl->json->error->message - . sprintf(' [%s]', $curl->json->error->code), - $curl->json->status_code - ); + if (isset($curl->json->error)) { + throw new RuntimeException( + $curl->json->error->message + . sprintf(' [%s]', $curl->json->error->code), + $curl->json->status_code + ); + } if ($curl->transfer['http_code'] !== 200) { $error = '[HTTP ' . $curl->transfer['http_code'] . '] ' . $zipBall;