Unverified Commit 55f681fd authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(ObjectsAttribute) Remove non-existing object types

issue #6083
Showing with 3 additions and 3 deletions
+3 -3
......@@ -46,7 +46,7 @@ class ObjectsAttribute extends GenericDialogAttribute
$attributes[$display_attr] = '*';
}
$specialAttributes = array_intersect([$store_attr,$display_attr], ['nameAttr','mainAttr']);
foreach ($objectTypes as $type) {
foreach ($objectTypes as $i => $type) {
try {
if (!empty($specialAttributes)) {
$infos = objects::infos($type);
......@@ -61,10 +61,10 @@ class ObjectsAttribute extends GenericDialogAttribute
}
}
} catch (NonExistingObjectTypeException $e) {
continue;
unset($objectTypes[$i]);
}
}
$this->selectManagementParameters = [$objectTypes,TRUE,$attributes];
$this->selectManagementParameters = [array_values($objectTypes),TRUE,$attributes];
$this->filterElementDefinitions = $filterElementDefinitions;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment