fusioninventory / fusioninventory-for-glpi

FusionInventory plugin for GLPI
http://www.FusionInventory.org/
GNU Affero General Public License v3.0
361 stars 148 forks source link

Version 9.1.1.1: Undefined index: glpiactiveentities_string #2036

Open lufik opened 7 years ago

lufik commented 7 years ago

Hi,

I just upgraded to: GLPI: 9.1.2 FusionInventory: 9.1.1.1

Every time the cronCleanoldagents automatic action runs it logs

I see in plugins/fusioninventory/inc/collect.class.php on line 131 it calls getEntitiesRestrictRequest without a value so the db function expects value in $_SESSION['glpiactiveentities_string']. But as far as it is cron it has no session. I expect it's not high priority to fix it (no change in main behaviour except logging above errors).

lufik commented 7 years ago

For a now I used quick&dirty fix in plugins/fusioninventory/inc/collect.class.php in function getSearchOptionsToAdd(): I put the body from (inclusive): $pfCollect = new PluginFusioninventoryCollect(); to (without this line): return $tab; into: if (isset($_SESSION['glpiactiveentities_string'])) { }

This stops to report above errors without functional change.