diff --git a/core/lib/Drupal/Core/Theme/ThemeManager.php b/core/lib/Drupal/Core/Theme/ThemeManager.php index 58d0ac9..6fea484 100644 --- a/core/lib/Drupal/Core/Theme/ThemeManager.php +++ b/core/lib/Drupal/Core/Theme/ThemeManager.php @@ -310,11 +310,11 @@ public function render($hook, array $variables) { // Generate the output using either a function or a template. $output = ''; if (isset($info['function'])) { - if (is_callable($info['function'])) { + if (function_exists($info['function'])) { // Theme functions do not render via the theme engine, so the output is // not autoescaped. However, we can only presume that the theme function // has been written correctly and that the markup is safe. - $output = Markup::create(call_user_func_array($info['function'], array($variables))); + $output = Markup::create($info['function']($variables)); } } else {