From c045980862b2cc6ebf4d4e47847ba7c4aef0d418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Wed, 17 Nov 2021 02:35:25 +0300 Subject: [PATCH] typo --- app/Jobs/Install/DownloadFile.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Jobs/Install/DownloadFile.php b/app/Jobs/Install/DownloadFile.php index aa6f6ce0d..d249329ad 100644 --- a/app/Jobs/Install/DownloadFile.php +++ b/app/Jobs/Install/DownloadFile.php @@ -40,6 +40,12 @@ class DownloadFile extends Job $file = $response->getBody()->getContents(); + $json = json_decode($file); + + if (is_object($json)) { + throw new \Exception($json->message); + } + $path = 'temp-' . md5(mt_rand()); $temp_path = storage_path('app/temp/' . $path);