From 63dff7fb34faa24a5d3ccf3fa4afd7e630493dfe Mon Sep 17 00:00:00 2001 From: Repellent Date: Thu, 1 Jan 2026 23:40:09 +0500 Subject: [PATCH] =?UTF-8?q?fix=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BD=D0=BE=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/comment.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/class/comment.php b/class/comment.php index 536d393..301671c 100644 --- a/class/comment.php +++ b/class/comment.php @@ -828,9 +828,9 @@ function commentPostEdit($comment_id) // 2. Проверка лимита: (Оставшиеся старые + Новые) не должно быть больше MAX $max_limit = (int)($row['comment_max_files'] ?? 5); - if ((count($current_files) + $new_files_count) > $max_limit) { - echo "MAX_FILES_LIMIT_EXCEEDED"; // Это поймает JS - exit; + if ((count($current_files) + $new_files_to_upload_count) > $max_limit) { + echo "MAX_FILES_LIMIT_EXCEEDED"; + exit; } $allowed_ext_str = $row['comment_allowed_extensions'] ?? 'jpg,jpeg,png,gif,webp';