Skip to content

Commit d41c7c4

Browse files
fix: Undefined array key "entities_id"
1 parent cd54e74 commit d41c7c4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

inc/container.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1706,7 +1706,7 @@ public static function findContainers($itemtype, $type = 'tab', $subtype = '', $
17061706
$obj = new $itemtype();
17071707
if ($obj->getFromDB($itemId)) {
17081708

1709-
$entityId = $obj->fields['entities_id'];
1709+
$entityId = $obj->fields['entities_id'] ?? 0;
17101710
$entityIds = getAncestorsOf("glpi_entities", $entityId);
17111711
$entityIds[] = $entityId; // Add entity obj itself to the list
17121712
$glpiActiveEntities = $_SESSION['glpiactiveentities'] ?? 0;

0 commit comments

Comments
 (0)