Problem/Motivation

After installing the module I am getting the following error when visiting /admin/config/user-interface/ab_test/add

Warning: Trying to access array offset on value of type bool in Drupal\abtestui\Form\ABTestForm->buildForm() (line 195 of modules/contrib/abtestui/src/Form/ABTestForm.php).
Drupal\abtestui\Form\ABTestForm->buildForm(Array, Object, NULL)
call_user_func_array(Array, Array) (Line: 531)

Steps to reproduce

  1. install module
  2. go to /admin/config/user-interface/ab_test/add
  3. Error message should be displayed

Proposed resolution

Looks like the form value needs to be checked if it is empty.

Remaining tasks

  1. Submit patch/PR

User interface changes

None

API changes

None

Data model changes

None

Issue fork abtestui-3277027

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

PCate created an issue. See original summary.

alphex’s picture

Confirmed this appears to solve the issue.

For anyone else looking. here's the patch file : https://git.drupalcode.org/project/abtestui/-/merge_requests/1.patch

pcate’s picture

Status: Active » Needs review
pcate’s picture

Assigned: pcate » Unassigned
jatingupta40’s picture

I will review this patch(#3).