From 9ae96baacd299f686a8316b43f8e3e569d2b8ce3 Mon Sep 17 00:00:00 2001 From: ilumos Date: Sun, 17 May 2020 12:55:15 +0100 Subject: [PATCH] Check if SteamSpy API returns no apps --- src/Commands/Steam/QueuePopularApps.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Commands/Steam/QueuePopularApps.php b/src/Commands/Steam/QueuePopularApps.php index e1deb46..0c48480 100644 --- a/src/Commands/Steam/QueuePopularApps.php +++ b/src/Commands/Steam/QueuePopularApps.php @@ -67,6 +67,13 @@ class QueuePopularApps extends Command $apps = json_decode($result->getBody(), true); + if ( ! count($apps) ) { + $this->error('SteamSpy API did not return any apps:'); + $this->error(self::POPULAR_STEAM_APP_LIST_URL . ' returned:'); + $this->error($result->getBody()); + die(); + } + $i = 0; foreach ($apps as $appId => $app) {