- Issue created by @arunkumark
- Merge request !19Warning: foreach() argument must be of type array|object on userHasSelectedRoles() → (Open) created by arunkumark
The error shows randomly on the Content type save and other forms.
Warning: foreach() argument must be of type array|object, null given in Drupal\advanced_pwa\Controller\AdvancedpwaController->userHasSelectedRoles() (line 319 of modules/contrib/advanced_pwa/src/Controller/AdvancedpwaController.php).
Drupal\advanced_pwa\Controller\AdvancedpwaController->userHasSelectedRoles() (Line: 290)
Drupal\advanced_pwa\Controller\AdvancedpwaController->settings()
call_user_func_array() (Line: 123)
1. Install module.
2. Go to `/admin/config/system/advanced-pwa`.
3. Fill required fields and save the configuration.
4. Access the content types that are configured, able to see the error message.
Check variable is array before using the foreach.
Nil
Nil
Nil
Nil
Active
1.0
Code