Error adding new breakpoints

Created on 26 October 2023, about 1 year ago

Problem/Motivation

When trying to add additional breakpoints on the DFP Tag form, clicking the "Add another breakpoint" button doesn't add additional rows to the form. Checking the logs the following error shows:

TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method Drupal\dfp\Form\Tag::moreBreakpointsSubmit() cannot be called statically in call_user_func_array() (line 114 of /path/to/project/web/core/lib/Drupal/Core/Form/FormSubmitter.php).

Steps to reproduce

Add or edit a DFP Tag and click the "Add another breakpoint" button. I'm using PHP 8.1 when experiencing this.

Proposed resolution

Change moreBreakpointsSubmit() and moreBreakpointsJs() to static methods.

Patch to follow.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom jeni_dc

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

Comments & Activities

Production build 0.71.5 2024