Warning: foreach() argument must be of type array|object, string given in Drupal\advanced_pwa\Form\ManifestConfigurationForm->submitForm()

Created on 28 November 2024, 24 days ago

Problem/Motivation

After installing the module andsetup first configuration, if we do not add screenshots, we catch the following error:

Warning: foreach() argument must be of type array|object, string given in Drupal\advanced_pwa\Form\ManifestConfigurationForm->submitForm() (line 446 of /var/www/html/drupal/modules/contrib/advanced_pwa/src/Form/ManifestConfigurationForm.php)

Steps to reproduce

1. Install module.
2. Go to `/admin/config/system/advanced-pwa`.
3. Fill required fields and save configuration.
4. Get an error.

Proposed resolution

Change validation of `uploaded_screenshots` from `->hasValue()`, to `->getValue()` and `empty()`.

🐛 Bug report
Status

Active

Version

1.71

Component

Code

Created by

🇵🇱Poland michal_liszka

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