forked from miguel456/rbrecruiter
Fix error where exception appeared instead of error message
This commit fixes an issue with fake MC usernames being used and resulting in a fatal exception. Displays an error msg now.
This commit is contained in:
@@ -20,8 +20,18 @@ class UsernameUUID
|
||||
$input = $request->all();
|
||||
if (isset($input['uuid']))
|
||||
{
|
||||
$username = $input['uuid'];
|
||||
$input['uuid'] = UUID::toUUID($username);
|
||||
try
|
||||
{
|
||||
$username = $input['uuid'];
|
||||
$input['uuid'] = UUID::toUUID($username);
|
||||
}
|
||||
catch(\InvalidArgumentException $iae)
|
||||
{
|
||||
report($iae);
|
||||
|
||||
$request->session()->flash('error', $iae->getMessage());
|
||||
return redirect(route('register'));
|
||||
}
|
||||
|
||||
$request->replace($input);
|
||||
}
|
||||
|
Reference in New Issue
Block a user