Skip to content

Commit 99b20f9

Browse files
committed
Fix Undefined array key #access in wxt_core_form_alter()
1 parent 3ec4976 commit 99b20f9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/custom/wxt_core/wxt_core.module

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,11 @@ function wxt_core_form_user_form_alter(array &$form) {
292292
function wxt_core_form_alter(array &$form, FormStateInterface $form_state) {
293293
$form_object = $form_state->getFormObject();
294294

295-
if ($form_object instanceof ContentEntityFormInterface && isset($form['revision_information']) && $form['revision_information']['#access']) {
295+
if (
296+
$form_object instanceof ContentEntityFormInterface &&
297+
isset($form['revision_information']) &&
298+
(!isset($form['revision_information']['#access']) || $form['revision_information']['#access'])
299+
) {
296300
// Load the form mode and show the revision information if the form mode
297301
// allows the revision UI to be shown.
298302
$form_display = $form_object->getFormDisplay($form_state);

0 commit comments

Comments
 (0)