There's a bug inside FieldCollectionItemEntity::langcode method.

if ($this->delta() != NULL) {
      return $this->langcode;
}

As you see it does inappropriate comparison !=. The comparison should be strict including data type !==, because delta method returns int, which could be zero.

Attaching patch to fix the bug.

CommentFileSizeAuthor
#1 2336647-entity-langcode-fix.patch442 bytesnostop8
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nostop8’s picture

Issue summary: View changes
FileSize
442 bytes

  • jmuzz committed ae64ac2 on 7.x-1.x authored by nostop8
    Issue #2336647 by nostop8: Fixed an incorrect if statement.
    
jmuzz’s picture

Priority: Critical » Normal
Status: Needs review » Fixed
Issue tags: -Field collection

Nice find. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.