Skip to content

Commit 58436b8

Browse files
fix: Undefined array key "entities_id"
1 parent 9b75107 commit 58436b8

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
@@ -1598,7 +1598,7 @@ public static function findContainers($itemtype, $type = 'tab', $subtype = '', $
15981598
$obj = new $itemtype();
15991599
if ($obj->getFromDB($itemId)) {
16001600

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

0 commit comments

Comments
 (0)