diff --git a/lib/Twig/Environment.php b/lib/Twig/Environment.php index 51ffc53fe..d75a42568 100644 --- a/lib/Twig/Environment.php +++ b/lib/Twig/Environment.php @@ -489,7 +489,7 @@ class Twig_Environment */ public function createTemplate($template) { - $name = sprintf('__string_template__%s', hash('sha256', uniqid(mt_rand(), true), false)); + $name = sprintf('__string_template__%s', hash('sha256', $template, false)); $loader = new Twig_Loader_Chain(array( new Twig_Loader_Array(array($name => $template)),