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 {