From 6e2c5a0ec7e1cd4080df7a66f0ae3bac67c2793f Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Thu, 30 May 2019 19:50:47 -0500 Subject: [PATCH] stuff --- app/Console/Commands/GetStructures.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app/Console/Commands/GetStructures.php b/app/Console/Commands/GetStructures.php index 715f2a36b..6c562a157 100644 --- a/app/Console/Commands/GetStructures.php +++ b/app/Console/Commands/GetStructures.php @@ -106,14 +106,15 @@ class GetStructuresCommand extends Command Log::critical("Failed to get structure list."); return null; } - - for($i = 1; $i <= $structures->pages; $i++) { - $job = new JobProcessStructure; - $job->charId = $charId; - $job->corpId = $corpId; - $job->page = $i; - ProcessStructureJob::dispatch($job)->onQueue('structures'); - } + if(isset($structures)) { + for($i = 1; $i <= $structures->pages; $i++) { + $job = new JobProcessStructure; + $job->charId = $charId; + $job->corpId = $corpId; + $job->page = $i; + ProcessStructureJob::dispatch($job)->onQueue('structures'); + } + } //Mark the job as finished $task->SetStopStatus();