A patch was re-rolled in https://www.drupal.org/node/1580348#comment-11546989 that accidentally introduced small bug that can lead to an undefined index notice.

In my case, I was rendering an entity reference field manually like so:

field_view_field('node', $variables['node'], 'field_featured_image', array(
  'label' => 'hidden',
  'type' => 'entityreference_entity_view',
  'settings' => array(
    'view_mode' => 'xxlarge_no_crop',
  ),
));

I get this:

Notice: Undefined index: in entityreference_field_formatter_prepare_view() (line 1309 of /Users/bosborne/Projects/pwds_cms/build/html/sites/all/modules/contrib/entityreference/entityreference.module).

This patch fixes the if statement to properly check if the array index exists before accessing it.

CommentFileSizeAuthor
#2 2905413.patch747 bytesbkosborne

Comments

bkosborne created an issue. See original summary.

bkosborne’s picture

Status: Active » Needs review
StatusFileSize
new747 bytes