pluginsGLPI / order

Order plugin for GLPI
GNU General Public License v3.0
39 stars 44 forks source link

The automatic action 'ComputeLateOrders' fails #311

Closed pvasener closed 2 years ago

pvasener commented 2 years ago

The automatic action 'ComputeLateOrders' fails with the following error:

glpiphplog.CRITICAL: *** Uncaught Exception Error: Call to a member function getType() on array in /var/www/html/glpi/prod/marketplace/order/inc/notificationtargetorder.class.php at line 72

Indeed, when I check the code, the method getType() is called on an array and not on the Order object. I quickly fixed it by hard-coding with "pluginorderorder" but I think a proper fix would be to properly load the order from order['id'] and then call GetType() on it, or to pass the type to the $options['orders'] array.

cedric-anne commented 2 years ago

Hi

321 should fix this issue.