Problem/Motivation

EntityNG::language() returns NULL even when a language has been set for the entity.

Proposed resolution

Switch ->language to ->value.

return $this->get('langcode')->value;
CommentFileSizeAuthor
#1 1823584-language.patch463 byteslinclark
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Status: Active » Needs review
FileSize
463 bytes

Status: Needs review » Needs work

The last submitted patch, 1823584-language.patch, failed testing.

Anonymous’s picture

Title: EntityNG::language() returns NULL » EntityNG::language() returns FALSE

It was actually FALSE, not NULL that it was returning for me. It still does return FALSE, I'm not sure how these tests are using it differently.

Anonymous’s picture

Status: Needs work » Closed (works as designed)

Nevermind, this is because the entity_test entity has a langcode field and I copied that to jsonld_test without copying the attachPropertyData function.