diff --git a/core/lib/Drupal/Core/Template/TwigExtension.php b/core/lib/Drupal/Core/Template/TwigExtension.php index 69f3298..ae3adf4 100644 --- a/core/lib/Drupal/Core/Template/TwigExtension.php +++ b/core/lib/Drupal/Core/Template/TwigExtension.php @@ -400,6 +400,9 @@ public function escapePlaceholder($env, $string) { * @return string|null * The escaped, rendered output, or NULL if there is no valid output. * + * @throws \Exception + * When passed $string as an object that has no __toString() method. + * * @todo Refactor this to keep it in sync with theme_render_and_autoescape() * in https://www.drupal.org/node/2575065 */ @@ -483,6 +486,9 @@ public function escapeFilter(\Twig_Environment $env, $arg, $strategy = 'html', $ * @return mixed * The rendered output or an Twig_Markup object. * + * @throws \Exception + * When passed $string as an object that has no __toString() method. + * * @see render * @see TwigNodeVisitor */