Skip to content

Commit

Permalink
fix(dropdownfield): prevent PHP notice
Browse files Browse the repository at this point in the history
for glpi object fields / users without the entity restriction set; see commit 79af87d
  • Loading branch information
btry committed Jan 21, 2022
1 parent d32682c commit 8a7f3f3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions inc/field/dropdownfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ public function buildParams($rand = null) {
$dparams['right'] = 'all';
$currentEntity = Session::getActiveEntity();
$ancestorEntities = getAncestorsOf(Entity::getTable(), $currentEntity);
$decodedValues['entity_restrict'] = $decodedValues['entity_restrict'] ?? self::ENTITY_RESTRICT_FORM;
switch ($decodedValues['entity_restrict']) {
case self::ENTITY_RESTRICT_FORM:
$form = new PluginFormcreatorForm();
Expand Down

0 comments on commit 8a7f3f3

Please sign in to comment.