Using this module on a site with PHP 8.1 I'm getting the following error:

Deprecated function: Automatic conversion of false to array is deprecated in err_translation_fixes_entity_revision_create() (line 157 of modules/contrib/err_translation_fixes/err_translation_fixes.module).
err_translation_fixes_entity_revision_create(Object, Object, NULL)

This is the offending piece of code:
$ids[] = $new_revision->id();

Checking $ids is an array before adding the new revision ID to it should resolve this issue, I believe.

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

a.hover created an issue. See original summary.

a.hover’s picture

This patch appears to resolve this problem.
However, not sure if this is the best place for the code or if the original code should be changed from:
$ids = &drupal_static(__FUNCTION__ . '_ids', FALSE);
To
$ids = &drupal_static(__FUNCTION__ . '_ids', []);

Not wanting to disrupt things too much, so have opted for the patch version instead.

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

abhishek_gupta1’s picture

Status: Active » Needs review

@a.hover, I have tested locally. the above patch is working well for me. issue has fixed. Also Created MR easy to merge .