Skip to content

Commit

Permalink
Merge pull request #273 from andrewminton/andrewminton-patch-1
Browse files Browse the repository at this point in the history
Fatal Error if Role within a section fix
  • Loading branch information
nitriques committed Dec 8, 2015
2 parents 0cd8da5 + 5f3987d commit 0969177
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extension.driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,10 @@ public function checkEventPermissions(array &$context){

$role = RoleManager::fetch($role_id);
$event_handle = strtolower(preg_replace('/^event/i', NULL, get_class($context['event'])));
$success = $role->canProcessEvent($event_handle, $action, $required_level) ? true : false;
$success = false;
if ($role) {
$success = $role->canProcessEvent($event_handle, $action, $required_level) ? true : false;
}

$context['messages'][] = array(
'permission',
Expand Down
3 changes: 3 additions & 0 deletions extension.meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
</author>
</authors>
<releases>
<release version="1.5.1" date="2015-12-08" min="2.4" max="2.6.x">
* [#272](https://github.com/symphonycms/members/issues/272) Role Permissions error
</release>
<release version="1.5" date="2015-11-20" min="2.4" max="2.6.x">
* [#267](https://github.com/symphonycms/members/issues/267) Symphony 2.6.x compatibilty
* Ensure the Member Email class is always around
Expand Down

0 comments on commit 0969177

Please sign in to comment.