Skip to content

Commit

Permalink
Default access list to empty array if publickey is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Sep 25, 2015
1 parent 934b9d3 commit 702176b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Imbo/Auth/AccessControl/Adapter/MongoDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function __construct(array $params = null, MongoClient $client = null, Mo
* {@inheritdoc}
*/
public function hasAccess($publicKey, $resource, $user = null) {
$accessList = $this->getAccessListForPublicKey($publicKey);
$accessList = $this->getAccessListForPublicKey($publicKey) ?: [];

foreach ($accessList as $acl) {
// If the group specified has not been defined, throw an exception to help the user
Expand Down

0 comments on commit 702176b

Please sign in to comment.