Skip to content

Commit 13ea826

Browse files
fix: Undefined array key "entities_id"
1 parent 67b011b commit 13ea826

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
@@ -1700,7 +1700,7 @@ public static function findContainers($itemtype, $type = 'tab', $subtype = '', $
17001700
$obj = new $itemtype();
17011701
if ($obj->getFromDB($itemId)) {
17021702

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

0 commit comments

Comments
 (0)