Skip to content

Commit d0db95c

Browse files
committed
refactor(formanswer): set entity with shorter expression
1 parent 030f93e commit d0db95c

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

inc/formanswer.class.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -847,9 +847,7 @@ public function prepareInputForAdd($input) {
847847

848848
$input = $this->setValidator($input, $form);
849849

850-
$input['entities_id'] = isset($_SESSION['glpiactive_entity'])
851-
? $_SESSION['glpiactive_entity']
852-
: $form->fields['entities_id'];
850+
$input['entities_id'] = $_SESSION['glpiactive_entity'] ?? $form->fields['entities_id'];
853851

854852
$input['is_recursive'] = $form->fields['is_recursive'];
855853
$input['plugin_formcreator_forms_id'] = $form->getID();

0 commit comments

Comments
 (0)