WPML

Overview of the Issue

You may encounter a fatal error when attempting to update Advanced Custom Fields repeater fields if the translation is a duplicate in environments running PHP 8.1 or higher.

PHP Fatal error:  Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in .../wp-content/plugins/acfml/classes/class-wpml-acf-repeater-shuffle.php:175

Workaround

This issue is fixed in Advanced Custom Fields Multilingual 2.1.4. Updating solves it on your site, so you only need this workaround if you can’t update yet.

Please, make sure of having a full site backup of your site before proceeding.

  • Open …/wp-content/plugins/acfml/classes/class-wpml-acf-repeater-shuffle.php file.
  • Look for line 24.
  • Replace:
    PHP
    private $meta_data_after_move;
  • With:
    PHP
    private $meta_data_after_move = [];

All known issues

Still Seeing This Issue?

If updating doesn’t fix it, ask a support question and we’ll look into it with you.