Skip to content

Commit

Permalink
Merge branch 'wip'
Browse files Browse the repository at this point in the history
  • Loading branch information
bochoven committed Nov 29, 2016
2 parents 0a2d8f5 + 232e742 commit 04808c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/modules/deploystudio/lib/deploystudio_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function pull_deploystudio_data(&$deploystudio_model)
// Get computer data from DeployStudio
$url = "{$deploystudio_server}/computers/get/entry?id={$deploystudio_model->serial_number}";
$deploystudio_computer_result = $this->get_deploystudio_url($url);

if(! $deploystudio_computer_result){
throw new Exception("No data received from deploystudio server", 1);
}
Expand All @@ -34,6 +34,10 @@ public function pull_deploystudio_data(&$deploystudio_model)
$plist->parse($deploystudio_computer_result);

$plist = $plist->toArray();
if( ! $plist){
throw new Exception("Machine not found in deploystudio server", 1);
}

$plist = array_values($plist);
$plist = $plist[0];

Expand Down

0 comments on commit 04808c2

Please sign in to comment.