When using PHP 8.1 the post_update call throws a typeerror for count() if "null" was given.

Issue fork address-3291035

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

pebosi created an issue. See original summary.

HitchShock made their first commit to this issue’s fork.

hitchshock’s picture

The issue is reproducible for me too.
But the previous solution is a bit wrong. array_pop() updates $sandbox['fields'] on each sandbox iteration, it means that $sandbox['count'] will be updated too what is wrong. We have to set $sandbox['count'] only once.

jsacksick’s picture

Status: Needs review » Fixed

Committed, thanks!!

  • jsacksick committed 01888e2a on 8.x-1.x authored by HitchShock
    Issue #3291035 by pebosi, HitchShock: PHP 8.1: TypeError in post_update.
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.