Unable to explode array when only one checkbox is checked

Created on 9 May 2024, about 2 months ago
Updated 15 May 2024, about 2 months ago

Problem/Motivation

When saving the configuration and only checking one checkbox, the array generated by $v[self::WEBFORM_FIELD] does not contain a comma-separated value, causing an issue when attempting to explode the array at position 1.

Steps to reproduce

  1. Open the configuration settings.
  2. Click manage fields.
  3. Activate a field checkbox without without filling anything else.
  4. Save the configuration.

Proposed resolution

Generate a variable that, if explode(',', $v[self::WEBFORM_FIELD])[1] does not contain anything, passes it empty.

Remaining tasks

  • Implement the proposed resolution.
  • Test the fix thoroughly to ensure it resolves the issue.

User interface changes

No user interface changes are required.

API changes

No API changes are required.

Data model changes

No data model changes are required.

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain whereiam

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

Comments & Activities

Production build 0.69.0 2024