Skip to content

Fix: foreach() argument must be of type array|object#1037

Merged
Rom1-B merged 1 commit into
mainfrom
support_38732
Oct 14, 2025
Merged

Fix: foreach() argument must be of type array|object#1037
Rom1-B merged 1 commit into
mainfrom
support_38732

Conversation

@Rom1-B

@Rom1-B Rom1-B commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !38732

Avoid this error in the logs:

glpi.WARNING:   *** Warning: foreach() argument must be of type array|object, null given at container.class.php line 244
  Backtrace :
  ./marketplace/fields/inc/container.class.php:244   
  ./marketplace/fields/hook.php:87                   PluginFieldsContainer::installUserData()
  ./src/Plugin.php:1160                              plugin_fields_install()
  :                                                  Plugin->install()
  ./src/Glpi/Marketplace/Controller.php:655          call_user_func()
  ./src/Glpi/Marketplace/Controller.php:545          Glpi\Marketplace\Controller->setPluginState()
  ./ajax/marketplace.php:63                          Glpi\Marketplace\Controller->installPlugin()
  ...Glpi/Controller/LegacyFileLoadController.php:64 require()
  ./vendor/symfony/http-kernel/HttpKernel.php:181    Glpi\Controller\LegacyFileLoadController->__invoke()
  ./vendor/symfony/http-kernel/HttpKernel.php:76     Symfony\Component\HttpKernel\HttpKernel->handleRaw()
  ./vendor/symfony/http-kernel/Kernel.php:197        Symfony\Component\HttpKernel\HttpKernel->handle()
  ./public/index.php:70                              Symfony\Component\HttpKernel\Kernel->handle()

Screenshots (if appropriate):

@Rom1-B Rom1-B requested a review from stonebuzz October 14, 2025 07:20
@Rom1-B Rom1-B merged commit ea2e98f into main Oct 14, 2025
3 checks passed
@Rom1-B Rom1-B deleted the support_38732 branch October 14, 2025 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants