Skip to content

Commit

Permalink
Merge pull request #1481 from ExpressionEngine/bug/6.x/issue-1459
Browse files Browse the repository at this point in the history
avoid error on Access Overview page when module files are not present
  • Loading branch information
intoeetive committed Oct 22, 2021
2 parents b3ae34a + 499eee3 commit 2a69f92
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions system/ee/ExpressionEngine/Controller/Members/Profile/Access.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,15 @@ protected function getPermissions()

foreach ($role->AssignedModules as $module) {
$addon = ee('Addon')->get(strtolower($module->module_name));
$key = 'access_to_add_on_id_' . $module->getId() . ':' . $addon->getName();
if ($addon) {
$key = 'access_to_add_on_id_' . $module->getId() . ':' . $addon->getName();

if (! array_key_exists($key, $permissions)) {
$permissions[$key] = [];
}
if (! array_key_exists($key, $permissions)) {
$permissions[$key] = [];
}

$permissions[$key][] = $display;
$permissions[$key][] = $display;
}
}
}
}
Expand Down

0 comments on commit 2a69f92

Please sign in to comment.