Skip to content

Commit

Permalink
fixed vote acl
Browse files Browse the repository at this point in the history
those methods can return `null` the votemanager didnt respect that
  • Loading branch information
digitalkaoz committed Nov 5, 2015
1 parent 2cc3e38 commit 6d00d21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Acl/AclVoteManager.php
Expand Up @@ -62,7 +62,7 @@ public function findVoteById($id)
{
$vote = $this->realManager->findVoteById($id);

if (!$this->voteAcl->canView($vote)) {
if ($vote && !$this->voteAcl->canView($vote)) {
throw new AccessDeniedException();
}

Expand All @@ -76,7 +76,7 @@ public function findVoteBy(array $criteria)
{
$vote = $this->realManager->findVoteBy($criteria);

if (!$this->voteAcl->canView($vote)) {
if ($vote && !$this->voteAcl->canView($vote)) {
throw new AccessDeniedException();
}

Expand Down

0 comments on commit 6d00d21

Please sign in to comment.