diff --git a/src/CommonITILTask.php b/src/CommonITILTask.php index 2c695710ccf..ef4b49e9a2d 100644 --- a/src/CommonITILTask.php +++ b/src/CommonITILTask.php @@ -1283,7 +1283,11 @@ public static function genericPopulatePlanning($itemtype, $options = []) /// Specific for tickets $interv[$key]["device"] = []; - if (isset($parentitem->hardwaredatas) && !empty($parentitem->hardwaredatas)) { + if ( + $parentitem instanceof Ticket + && isset($parentitem->hardwaredatas) + && !empty($parentitem->hardwaredatas) + ) { foreach ($parentitem->hardwaredatas as $hardwaredata) { $interv[$key]["device"][$hardwaredata->fields['id']] = ($hardwaredata ? $hardwaredata->getName() : '');