D2: Fix updating of accounts with under 3 chars

parent be4c377a
Pipeline #994 passed with stages
in 2 minutes and 29 seconds
......@@ -110,7 +110,9 @@ class ApiV1Controller extends Controller
$msg = 'Stats for: <strong>'.$user->account->gamertag.'</strong> have been updated. <br /><br />';
foreach ($user->account->destiny2->characters() as $character) {
$msg .= $character->name().' - '.$character->max_light.'<br />';
if (! empty($character)) {
$msg .= $character->name().' - '.$character->max_light.'<br />';
}
}
return Response::json([
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment