Skip to content

Commit

Permalink
Update permissible interface update permission method to fix stupid p…
Browse files Browse the repository at this point in the history
…hp bug -.-'

https://bugs.php.net/bug.php?id=64079
Signed-off-by: Bruno Gaspar <brunofgaspar1@gmail.com>
  • Loading branch information
brunogaspar committed Sep 13, 2014
1 parent 8b5427b commit c950670
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Permissions/PermissibleInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ public function addPermission($permission, $value = true);
*
* @param string $permission
* @param bool $value
* @param bool $create
* @return \Cartalyst\Sentinel\Permissions\PermissibleInterface
*/
public function updatePermission($permission, $value = true);
public function updatePermission($permission, $value = true, $create = false);

/**
* Removes a permission.
Expand Down
2 changes: 1 addition & 1 deletion src/Permissions/PermissibleTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function updatePermission($permission, $value = true, $create = false)

$this->permissions = $permissions;
}
else if ($create)
elseif ($create)
{
$this->addPermission($permission, $value);
}
Expand Down

0 comments on commit c950670

Please sign in to comment.