seat
seat copied to clipboard
Sharelink redirect to 500 error page
- Problem: After creating a character sharelink, using it redirect to 500 error page
- Expected: getting access to characters attached to the sharelink
- Logs / Screenshots / Proof:
[2020-08-25 13:16:36] local.ERROR: Trying to get property 'name' of non-object {"exception":"[object] (ErrorException(code: 0): Trying to get property 'name' of non-object at /var/www/seat/vendor/eveseat/web/src/Http/Controllers/Auth/SharelinkController.php:56)
[stacktrace]
15:21
in row 56: $token->user->name, $token->character_id == 0 ? 'all characters' : $token->character->name, auth()->user()->name);
- Version Info: N/A
This looks like it might be an edge case if the character linked to the sharelink is no longer valid? Perhaps an additional check on this would help prevent this error condition.