diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php index fa7d138..05ddbba 100644 --- a/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/core/lib/Drupal/Core/Form/FormBuilder.php @@ -793,7 +793,7 @@ public function doBuildForm($form_id, &$element, FormStateInterface &$form_state $count++; } // Add after_build attribute to each element just to check safe markup. - $element['#after_build'][] = array(get_class($this), 'formSafeCheck'); + $element['#after_build'][] = array(get_class($this), 'self::formSafeCheck'); // The #after_build flag allows any piece of a form to be altered // after normal input parsing has been completed. if (isset($element['#after_build']) && !isset($element['#after_build_done'])) { @@ -873,7 +873,7 @@ public function doBuildForm($form_id, &$element, FormStateInterface &$form_state * @return array * - The form element marked as safe. */ - public static function formSafeCheck(array $element, FormStateInterface $form_state) { + protected function formSafeCheck(array $element, FormStateInterface $form_state) { // Filtering keys which are expected to contain HTML. $markup_keys = array( '#description',