Warning: Undefined array key 1 in line 187 of modules/contrib/asymmetric_translations/modules/at_auto_fix_entity_references/src/EventSubscriber/AutoFixNodeReferences.php

Created on 3 March 2023, over 1 year ago
Updated 20 April 2023, over 1 year ago

Problem/Motivation

When saving a node we get the following notice:

Warning: Undefined array key 1 in Drupal\at_auto_fix_entity_references\EventSubscriber\AutoFixNodeReferences->replaceLinkFieldValues() (line 187 of modules/contrib/asymmetric_translations/modules/at_auto_fix_entity_references/src/EventSubscriber/AutoFixNodeReferences.php)

Steps to reproduce

Save a node with at_auto_fix_entity_references module enabled

Proposed resolution

Investigate and fix

Remaining tasks

  • Investigate. The problem is weird, because just before this line we check whether the regular expression matches. If not, it should not get to this line
  • Fix the issue; a quick-fix might be to just check if $matches[1] is set, but that may still introduce bugs in the future. The best fix will be that it doesn't even get to this line.

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024