Skip to content
Snippets Groups Projects

Added mention of TrustedCallback attribute to error message.

6 files
+ 12
12
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -265,7 +265,7 @@ public static function processDatelist(&$element, FormStateInterface $form_state
// Allows custom callbacks to alter the element.
if (!empty($element['#date_date_callbacks'])) {
foreach ($element['#date_date_callbacks'] as $callback) {
$message = sprintf('Datelist element #date_date_callbacks callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/3217966', Variable::callableToString($callback));
$message = sprintf('Datelist element #date_date_callbacks callbacks must be methods with the Drupal\Core\Security\Attribute\TrustedCallback attribute, or be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface, or be an anonymous function. The callback was %s. See https://www.drupal.org/node/3217966', Variable::callableToString($callback));
StaticTrustedCallbackHelper::callback($callback, [&$element, $form_state, $date], $message);
}
}
Loading