Skip to content

Commit

Permalink
Fix for error when pass an array as second argument to gate (#17972)
Browse files Browse the repository at this point in the history
  • Loading branch information
MCMatters authored and taylorotwell committed Feb 17, 2017
1 parent 62f10bb commit 4fbd2a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Auth/Access/Gate.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ public function getPolicyFor($class)
$class = get_class($class);
}

if (! is_string($class)) {
return null;
}

if (isset($this->policies[$class])) {
return $this->resolvePolicy($this->policies[$class]);
}
Expand Down

0 comments on commit 4fbd2a3

Please sign in to comment.