Notice: Undefined index: target in linked_field_field_attach_view_alter()

Created on 30 October 2019, over 5 years ago
Updated 2 June 2025, 26 days ago

The code below doesn't check if the values have been set before using them:

      // Building an array which looks like the parameters you pass to l().
      $linked_field_settings = array(
        'linked' => $settings['linked_field']['linked'],
        'text' => $settings['linked_field']['advanced']['text'],
        'path' => $path,
        'options' => array(
          'attributes' => array(
            'title' => $settings['linked_field']['advanced']['title'],
       	    'target' => $settings['linked_field']['advanced']['target'],
            'class' => $settings['linked_field']['advanced']['class'],
            'rel' => $settings['linked_field']['advanced']['rel'],
          ),
	) + $destination_parsed,
      );

Adding an isset check works. But maybe an earlier check would work better.

🐛 Bug report
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇨🇦Canada minoroffense Ottawa, Canada

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024