diff --git a/inc/formanswer.class.php b/inc/formanswer.class.php index 1f3bfb7fa..d3a65ba82 100644 --- a/inc/formanswer.class.php +++ b/inc/formanswer.class.php @@ -847,9 +847,7 @@ public function prepareInputForAdd($input) { $input = $this->setValidator($input, $form); - $input['entities_id'] = isset($_SESSION['glpiactive_entity']) - ? $_SESSION['glpiactive_entity'] - : $form->fields['entities_id']; + $input['entities_id'] = $_SESSION['glpiactive_entity'] ?? $form->fields['entities_id']; $input['is_recursive'] = $form->fields['is_recursive']; $input['plugin_formcreator_forms_id'] = $form->getID();