foreach in ToolsPropertyInput::renderPropertyArray unintentionally overrides $property

Created on 5 September 2025, 9 days ago

Problem/Motivation

The foreach loop in \Drupal\ai\OperationType\Chat\Tools\ToolsPropertyInput::renderPropertyArray is unintentionally overriding the $property variable:

    if (!empty($this->properties)) {
      foreach ($this->properties as $property) {
        $property['properties'][$property->getName()] = $property->renderPropertyArray();
      }
    }

The function is building up a $property array, but then the loop is overriding it with property objects.

Proposed resolution

Fix.

πŸ› Bug report
Status

Active

Version

1.2

Component

AI Core module

Created by

πŸ‡ΊπŸ‡ΈUnited States michaellander

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024