Skip to content

Commit

Permalink
Revert "Use default driver when guards array is empty (#13979)" (#14063)
Browse files Browse the repository at this point in the history
This reverts commit a69bcc3a492ea4c18f150f0f8d3552af294581ad.
  • Loading branch information
JosephSilber authored and taylorotwell committed Jun 19, 2016
1 parent 7f6b4a7 commit 34f8f28
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Middleware/Authenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ public function handle($request, Closure $next, ...$guards)
protected function authenticate(array $guards)
{
if (count($guards) <= 1) {
$guard = array_first($guards) ?: $this->auth->getDefaultDriver();

$this->auth->guard($guard)->authenticate();
$this->auth->guard($guard = array_first($guards))->authenticate();

return $this->auth->shouldUse($guard);
}
Expand Down

0 comments on commit 34f8f28

Please sign in to comment.