Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed error in fetch_context_capabilities() when no local capabilitie…
…s defined in context
  • Loading branch information
skodak committed Sep 22, 2006
1 parent adbffcb commit 16e2e2f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/accesslib.php
Expand Up @@ -1946,7 +1946,9 @@ function fetch_context_capabilities($context) {
return false;
}

$records = get_records_sql($SQL.' '.$sort);
if (!$records = get_records_sql($SQL.' '.$sort)) {
$records = array();
}
$contextindependentcaps = fetch_context_independent_capabilities();
$records = array_merge($records, $contextindependentcaps);

Expand Down Expand Up @@ -2750,4 +2752,4 @@ function get_users_from_role_on_context($role, $context) {
AND roleid = $role->id");
}

?>
?>

0 comments on commit 16e2e2f

Please sign in to comment.