Skip to content

Conversation

@bacus99
Copy link

@bacus99 bacus99 commented Nov 7, 2025

Thanks to Phind AI :)

Since my migration to GLPI11, I have random error in APPLIANCE view when a computer was associated

*** Uncaught PHP Exception TypeError: "array_intersect(): Argument #1 ($array) must be of type array, int given" at AssignableItem.php line 63
Backtrace :
./src/Glpi/Features/AssignableItem.php:63
./src/Glpi/Features/AssignableItem.php:63 array_intersect()
./src/CommonDBTM.php:2986 Appliance->canViewItem()
./src/CommonDBTM.php:1486 CommonDBTM->can()
./src/Appliance_Item.php:285 CommonDBTM->getLink()
./src/Appliance_Item.php:100 Appliance_Item::showForItem()
./src/CommonGLPI.php:694 Appliance_Item::displayTabContentForItem()
./ajax/common.tabs.php:108 CommonGLPI::displayStandardTab()
...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()

message was clear as an array was expected, but an INT was provided.

This fix the vew issue

Checklist before requesting a review

Please delete options that are not relevant.

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

  • It fixes # (issue number, if applicable)
  • Here is a brief description of what this PR does

Screenshots (if appropriate):

Thanks to Phind AI :)  

Since my migration to GLPI11, I have random error in APPLIANCE view when a computer was associated

*** Uncaught PHP Exception TypeError: "array_intersect(): Argument glpi-project#1 ($array) must be of type array, int given" at AssignableItem.php line 63
  Backtrace :
  ./src/Glpi/Features/AssignableItem.php:63          
  ./src/Glpi/Features/AssignableItem.php:63          array_intersect()
  ./src/CommonDBTM.php:2986                          Appliance->canViewItem()
  ./src/CommonDBTM.php:1486                          CommonDBTM->can()
  ./src/Appliance_Item.php:285                       CommonDBTM->getLink()
  ./src/Appliance_Item.php:100                       Appliance_Item::showForItem()
  ./src/CommonGLPI.php:694                           Appliance_Item::displayTabContentForItem()
  ./ajax/common.tabs.php:108                         CommonGLPI::displayStandardTab()
  ...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()

message was clear as an array was expected, but an INT was provided.

This fix the vew issue
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.

1 participant