Skip to content

Commit 246a764

Browse files
fix(container): correct entity ID and add 'use Glpi\DBAL\QueryExpression'
1 parent d685bc5 commit 246a764

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

inc/container.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,13 +1709,13 @@ public static function findContainers($itemtype, $type = 'tab', $subtype = '', $
17091709
return [];
17101710
}
17111711

1712-
$entitiesIds = getAncestorsOf("glpi_entities", (string) $entityId);
1712+
$entitiesIds = getAncestorsOf("glpi_entities", (int) $entityId);
17131713
$entitiesIds[] = $entityId; // Add entity active itself to the list
17141714

17151715
$where = [
17161716
'is_active' => 1,
17171717
'type' => $type,
1718-
new \QueryExpression("JSON_CONTAINS(itemtypes, " . $DB->quote('"' . $itemtype . '"') . ")"),
1718+
new QueryExpression("JSON_CONTAINS(itemtypes, " . $DB->quote('"' . $itemtype . '"') . ")"),
17191719
'AND' => [
17201720
'OR' => [
17211721
[

0 commit comments

Comments
 (0)