summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php')
-rw-r--r--core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php b/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php
index 3507502..365020c 100644
--- a/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php
+++ b/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php
@@ -94,7 +94,7 @@ class KeyValueEntityStorage extends EntityStorageBase {
*/
public function doCreate(array $values = array()) {
// Set default language to site default if not provided.
- $values += array('langcode' => $this->languageManager->getDefaultLanguage()->getId());
+ $values += array($this->getEntityType()->getKey('langcode') => $this->languageManager->getDefaultLanguage()->getId());
$entity = new $this->entityClass($values, $this->entityTypeId);
// @todo This is handled by ContentEntityStorageBase, which assumes