BPMN: Array to string conversion warning - augmentor

Created on 5 June 2024, 11 months ago
Updated 6 June 2024, 11 months 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

  • Issue created by @j-barnes
  • πŸ‡ΊπŸ‡ΈUnited States j-barnes
  • πŸ‡ΊπŸ‡ΈUnited States j-barnes
  • Merge request !426Added array check validation for value. β†’ (Open) created by j-barnes
  • πŸ‡ΊπŸ‡ΈUnited States j-barnes
  • Status changed to Needs review 11 months ago
  • πŸ‡ΊπŸ‡ΈUnited States j-barnes
  • πŸ‡ΊπŸ‡ΈUnited States j-barnes
  • Pipeline finished with Success
    11 months ago
    Total: 469s
    #192245
  • Status changed to Closed: duplicate 11 months ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Hi @j-barnes thanks for reporting this and also contributing to the solution. However, this is a duplicate of ✨ Add support for select fields with multiple set to true Active where we've taken a different approach which keeps multi-values as an array and provide support in a textfield with values being separated by commas.

  • Pipeline finished with Success
    10 months ago
    Total: 184s
    #196250
  • Pipeline finished with Running
    10 months ago
    #197240
  • Pipeline finished with Success
    10 months ago
    Total: 212s
    #197628
  • Pipeline finished with Failed
    5 months ago
    Total: 186s
    #347884
  • Pipeline finished with Failed
    5 months ago
    Total: 383s
    #347888
  • Pipeline finished with Failed
    5 months ago
    Total: 556s
    #347889
  • Pipeline finished with Success
    5 months ago
    Total: 641s
    #350745
  • Pipeline finished with Skipped
    5 months ago
    #350811
  • Pipeline finished with Failed
    3 months ago
    Total: 190s
    #392307
  • Pipeline finished with Canceled
    3 months ago
    Total: 120s
    #392310
  • Pipeline finished with Success
    3 months ago
    Total: 823s
    #392311
  • Pipeline finished with Success
    3 months ago
    Total: 383s
    #404441
  • Pipeline finished with Failed
    22 days ago
    Total: 564s
    #459652
  • Pipeline finished with Canceled
    22 days ago
    Total: 416s
    #459668
  • Pipeline finished with Failed
    22 days ago
    Total: 683s
    #459671
  • Pipeline finished with Success
    22 days ago
    Total: 745s
    #459677
Production build 0.71.5 2024