Skip to content
Snippets Groups Projects
Commit 8e3287fe authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2936793 follow-up by tim.plunkett: Fix PHP5's hacking and wheezing.

(cherry picked from commit 02af9bc3)
parent 8640a9df
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -125,7 +125,7 @@ public static function generateSampleValue(FieldDefinitionInterface $field_defin ...@@ -125,7 +125,7 @@ public static function generateSampleValue(FieldDefinitionInterface $field_defin
// Defer to the callback in the item definition as it can be overridden. // Defer to the callback in the item definition as it can be overridden.
$constraint = $field_definition->getItemDefinition()->getConstraint('ComplexData'); $constraint = $field_definition->getItemDefinition()->getConstraint('ComplexData');
if (isset($constraint['value']['AllowedValues']['callback'])) { if (isset($constraint['value']['AllowedValues']['callback'])) {
$languages = $constraint['value']['AllowedValues']['callback'](); $languages = call_user_func($constraint['value']['AllowedValues']['callback']);
} }
else { else {
$languages = static::getAllowedLanguageCodes(); $languages = static::getAllowedLanguageCodes();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment