From 747dea2ac6b4827d93454b4a488087328e492926 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Tue, 13 May 2025 16:15:23 +0200 Subject: [PATCH] fix(question): misplaced parenthesis triggers a PHP warning when adding a file question, breaking the refresh of the list of question in a section --- inc/question.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/question.class.php b/inc/question.class.php index 4691b2978..ab1e834fb 100644 --- a/inc/question.class.php +++ b/inc/question.class.php @@ -405,7 +405,7 @@ public function prepareInputForAdd($input) { if (!$this->skipChecks) { $input = $this->checkBeforeSave($input); - if (!empty($input['default_values'] && $input['fieldtype'] === 'textarea')) { + if (!empty($input['default_values']) && $input['fieldtype'] === 'textarea') { $input['default_values'] = str_replace('\r\n', '', $input['default_values']); }