Dropping in an element just spins forever in PHP 8.2

Created on 21 November 2023, about 1 year ago

Problem/Motivation

After upgrading to PHP 8.2, dropping an element into the form just says "Please wait..." forever, and the item does not get added.

The javascript console says "500 error"

The drupal log says:
TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in element_children()

Any fix for this, for those of us being forced to upgrade to PHP 8.2?

🐛 Bug report
Status

Active

Component

Form Builder Core

Created by

🇨🇦Canada tmetzger

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

Comments & Activities

  • Issue created by @tmetzger
  • 🇮🇳India ganesh9930 Mumbai

    After upgrading to PHP 8.2 version. Then most facing issues in the code like
    "TypeError: count(): Argument #1 ($value) must be of type Countable|array"

    Solution :- check that variable is array or not. Or use is_countable function.
    e.g. $a = is_countable($b) ? count($b) : 0;

    Thank You

Production build 0.71.5 2024