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:
@@ -23,7 +23,13 @@ class UUID
|
||||
$username
|
||||
])->body(), true);
|
||||
|
||||
return $response[0]['id'];
|
||||
if (isset($response[0]))
|
||||
{
|
||||
return $response[0]['id'];
|
||||
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException("You must supply a valid, premium Minecraft account to sign up.");
|
||||
}
|
||||
|
||||
// Note: Caching could simply be assigning the username to it's UUID, however, to make this work, we'd need to loop over all cache items, which would be slighly ineffective
|
||||
|
Reference in New Issue
Block a user