diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php
index 1925474e41cc8223420862ac467b0c909df76c65..1755ba63f886651df8b58e1f9a674c935aed2394 100644
--- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php
+++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php
@@ -125,7 +125,7 @@ public static function generateSampleValue(FieldDefinitionInterface $field_defin
     // Defer to the callback in the item definition as it can be overridden.
     $constraint = $field_definition->getItemDefinition()->getConstraint('ComplexData');
     if (isset($constraint['value']['AllowedValues']['callback'])) {
-      $languages = $constraint['value']['AllowedValues']['callback']();
+      $languages = call_user_func($constraint['value']['AllowedValues']['callback']);
     }
     else {
       $languages = static::getAllowedLanguageCodes();