glpi-project / glpi-inventory-plugin

GLPI Inventory plugin
GNU Affero General Public License v3.0
43 stars 24 forks source link

prevent warning message #489

Closed Rom1-B closed 3 months ago

Rom1-B commented 3 months ago

Prevent:

image

PHP Warning (2): Undefined array key "id" in .../plugins/glpiinventory/inc/taskjobstate.class.php at line 626
Rom1-B commented 3 months ago

Please add an entry in the changelog, with a functional description. It guess this issue happens when the Tasks / Groups tab is displayed on a computer linked to an invalid agent.

In my case, the computer never had an agent, it was created manually.

This fix doesn't really have any functional impact, it just avoids a warning

But it does raise a question: does the tab make sense if the computer doesn't have an agent? In that case, should it only be displayed if there's a linked agent?

trasher commented 3 months ago

I think you can restrict display to computer which have an agent; yes.