Warning: foreach() argument must be of type array|object, bool given in Drupal\mailjet\Form\MailjetSettingsForm->buildForm() (line 102 of modules/contrib/mailjet/src/Form/MailjetSettingsForm.php).

Created on 15 March 2025, 22 days ago

Problem/Motivation

The respected warning message is coming on the Mailjet settings/configuration page.

Steps to reproduce

1. Goto settings page - admin/config/system/mailjet
2. On top, warning message will come -
Warning: foreach() argument must be of type array|object, bool given in Drupal\mailjet\Form\MailjetSettingsForm->buildForm() (line 102 of modules/contrib/mailjet/src/Form/MailjetSettingsForm.php).

Proposed resolution

Check if the argument is an array or not before using foreach.

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇮🇳India JatinGupta40

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024