BPMN: Array to string conversion warning - augmentor

Created on 5 June 2024, 22 days ago
Updated 6 June 2024, 22 days ago

Problem/Motivation

After installing Augmentor AI module, ECA triggers the warning "Warning: Array to string conversion in /var/www/html/docroot/modules/contrib/eca/modules/modeller_bpmn/src/ModellerBpmnBase.php on line 776" when trying to visit the ECA workflow page.

It seems like the value is being implicitly converted when casted as a string for source_fields that are provided by the Augmentor AI's action.

case 'select':
    $fields[] = $this->optionsField($key, $label, $weight, $description, $definition['#options'], (string) $value, $definition['#required'] ?? FALSE);

Steps to reproduce

  1. Install ECA Module / Enable
  2. Install BPMN / Enable
  3. Install Augmentor AI / Enable
  4. Visit the workflow page and notice the warning.

Proposed resolution

Adding an is_array before the cast seems to cure the issue.
$value = is_array($value) ? '' : $value;

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: duplicate

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States j-barnes

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024