Skip to content
Snippets Groups Projects

Issue #3364343: Warning: Undefined array key "#access" in language_form_alter()

Open Issue #3364343: Warning: Undefined array key "#access" in language_form_alter()
1 unresolved thread
1 unresolved thread

Merge request reports

Members who can merge are allowed to add commits.
Approval is optional
Ready to merge by members who can write to the target branch.
  • The source branch is 25 commits behind the target branch.
  • 1 commit will be added to 9.5.x.
  • Source branch will not be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
358 358 $entity = $form_object->getEntity();
359 359 $entity_type = $entity->getEntityType();
360 360 $langcode_key = $entity_type->getKey('langcode');
361 if (isset($form[$langcode_key]) && $form[$langcode_key]['#access'] !== FALSE) {
361 if (isset($form[$langcode_key]['#access']) && $form[$langcode_key]['#access'] !== FALSE) {
  • The solution looks good.

    An alternative would be if ($form[$langcode_key]['#access'] ?? TRUE) {. This assumes the value can either be TRUE, FALSE or not set.

    But the proposed change is more minimal, so I am ok with it.

  • Please register or sign in to reply
Please register or sign in to reply
Loading