Commit 8861804c authored by David Kindl's avatar David Kindl Committed by Joël Pittet
Browse files

Issue #3257747 by Mulambo, joelpittet, andregp: Required parameter after optional [PHP 8.0]

parent b4e44263
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ $plugin = array(
/**
 * Return a new context based on an existing context.
 */
function ctools_relcontext_from_simplecontext_context($context = NULL, $conf) {
function ctools_relcontext_from_simplecontext_context($context, $conf) {
  // If unset it wants a generic, unfilled context, which is just NULL.
  if (empty($context->data)) {
    return ctools_context_create_empty('relcontext', NULL);
+3 −2
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ function ctools_metadata_no_hook_node_access($op, $node = NULL, $account = NULL)
/**
 * Access callback for the user entity.
 */
function ctools_metadata_user_access($op, $entity = NULL, $account = NULL, $entity_type) {
function ctools_metadata_user_access($op, $entity, $account , $entity_type) {
  $account = isset($account) ? $account : $GLOBALS['user'];
  // Grant access to the users own user account and to the anonymous one.
  if (isset($entity) && $op != 'delete' && (($entity->uid == $account->uid && $entity->uid) || (!$entity->uid && $op == 'view'))) {
@@ -143,7 +143,8 @@ function ctools_metadata_comment_access($op, $entity = NULL, $account = NULL) {
/**
 * Access callback for the taxonomy entities.
 */
function ctools_metadata_taxonomy_access($op, $entity = NULL, $account = NULL, $entity_type) {
function ctools_metadata_taxonomy_access($op, $entity, $account, $entity_type) {

  if ($entity_type == 'taxonomy_vocabulary') {
    return user_access('administer taxonomy', $account);
  }