From 6ce5f34ff29916bdc764be193e91e78e26090317 Mon Sep 17 00:00:00 2001 From: Partydragen Date: Fri, 12 May 2023 18:42:15 +0200 Subject: [PATCH] Fix github releases issue Fix github releases issue --- upload/modules/Resources/pages/resources/resource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload/modules/Resources/pages/resources/resource.php b/upload/modules/Resources/pages/resources/resource.php index 1256109..e8156a5 100644 --- a/upload/modules/Resources/pages/resources/resource.php +++ b/upload/modules/Resources/pages/resources/resource.php @@ -1663,7 +1663,7 @@ // Get list of all releases $github_query = json_decode($github_query); - if(!isset($github_query[0])) $error = $resource_language->get('resources', 'unable_to_get_repo', ['repo' => Output::getClean($resource->github_username) . '/' . Output::getClean($resource->github_repo)]); + if(!is_array($github_query) || !count($github_query)) $error = $resource_language->get('resources', 'unable_to_get_repo', ['repo' => Output::getClean($resource->github_username) . '/' . Output::getClean($resource->github_repo)]); else { // Valid response $releases_array = [];