Skip to content

Commit

Permalink
Check if the driver name string is empty instead of just null. (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
v16Studios authored Aug 8, 2023
1 parent 01f67dd commit ac54970
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Services/Auth/AuthManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ protected function get(?string $name): Authenticator
*/
protected function resolve(?string $name): Authenticator
{
$driver = Package::getClass(Str::studly($name ?? 'Null') . 'Auth');
$name = empty($name) ? 'Null' : $name;
$driver = Package::getClass(Str::studly($name) . 'Auth');

if (!isset($driver)) {
throw new InvalidArgumentException(__('enjin-platform::error.auth.auth_not_defined'));
Expand Down

0 comments on commit ac54970

Please sign in to comment.