From 97ab451ca9403f871a7eda69be5e914ad0149931 Mon Sep 17 00:00:00 2001 From: Rom1-B <8530352+Rom1-B@users.noreply.github.com> Date: Fri, 6 Nov 2026 07:24:10 +0100 Subject: [PATCH] Fix: remove redundant field variable initialization --- CHANGELOG.md | 6 ++++++ src/Controller/QuestionTypeAjaxController.php | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f06804d..4c281f39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [Unreleased] + +### Fixed + +- Remove redundant variable initialization in the question type AJAX controller + ## [1.25.1] - 2026-10-28 ### Added diff --git a/src/Controller/QuestionTypeAjaxController.php b/src/Controller/QuestionTypeAjaxController.php index c54d8546..0fc282a9 100644 --- a/src/Controller/QuestionTypeAjaxController.php +++ b/src/Controller/QuestionTypeAjaxController.php @@ -79,9 +79,6 @@ public function __invoke(Request $request): Response // Get available fields for the selected block $available_fields = PluginFieldsQuestionType::getFieldsFromBlock((int) $block_id); - - // If field_id is not provided or invalid, use the first available field - $current_field_id = null; if ($field_id && is_numeric($field_id) && isset($available_fields[$field_id])) { $current_field_id = (int) $field_id; } else {