Problem/Motivation

Warning caused by incorrect `#default_value` set on the `$form['prepublish']['group_types']['enabled_group_types']`.
Tested with Drupal 11.3.

Warning:

Warning: foreach() argument must be of type array|object, null given in Drupal\Core\Render\Element\Checkboxes::valueCallback() (line 119 of core/lib/Drupal/Core/Render/Element/Checkboxes.php).

Steps to reproduce

* Visit `/admin/config/system/siteimprove`

CommentFileSizeAuthor
#3 siteimprove-3590123-MR46--20260514-1.diff771 bytesrecrit
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

recrit created an issue. See original summary.

recrit’s picture

Status: Active » Needs review
StatusFileSize
new771 bytes

Static patch attached for composer.

recrit changed the visibility of the branch 3504502-fix-phpstan-warnings to hidden.

beltofte made their first commit to this issue’s fork.

  • beltofte committed 3180163c on 3590123-fix-warning-2.0.x
    fix: #3590123 Settings Form - Warning: foreach() argument must be of...

  • beltofte committed 4a257fcb on 2.0.x
    fix: #3590123 Settings Form - Warning: foreach() argument must be of...
beltofte’s picture

Status: Needs review » Fixed

Fixed in both 3.0.x and 2.0.x. Thanks @recrit for contributing.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.