Error adding new breakpoints

Created on 26 October 2023, 8 months 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.69.0 2024