From c4e5164049178100469bcdd8ead8125eeddb0f81 Mon Sep 17 00:00:00 2001 From: Repellent Date: Thu, 26 Feb 2026 11:42:14 +0500 Subject: [PATCH] =?UTF-8?q?fix=20=D0=B4=D0=BB=D1=8F=20=D1=81=D0=BE=D0=B2?= =?UTF-8?q?=D0=BC=D0=B5=D1=81=D1=82=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D0=B8=20?= =?UTF-8?q?=D1=81=20php-8.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/forms.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/class/forms.php b/class/forms.php index 5c2aaf5..2d61440 100644 --- a/class/forms.php +++ b/class/forms.php @@ -522,16 +522,15 @@ function _cleanvar($var) $alias_id = $this->form['alias_id']; - $fld_val = $this->form['is_submited'] - ? $this->_stripslashes($_POST['form-' . $alias_id][$field_id] ?? null) - : (in_array($field['type'],array('input','textarea')) - ? $this->_eval2var('?>' . $field['defaultval'] . 'form['is_submited'] + ? $this->_stripslashes($_POST['form-' . $alias_id][$field_id] ?? null) + : (in_array($field['type'], ['input', 'textarea']) + ? $this->_eval2var('?>' . $field['defaultval']) + : $field['defaultval']); - // Убедитесь, что $fld_val является массивом - if (!is_array($fld_val)) { - $fld_val = [$fld_val]; // Преобразуем в массив - } + if (!is_array($fld_val)) { + $fld_val = [$fld_val]; + } $attributes = trim($field['attributes']);