fixed compat with PHP 5

This commit is contained in:
Fabien Potencier
2019-04-11 12:09:12 +02:00
parent 70b4a566ae
commit d0a3c239e2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -522,7 +522,7 @@ class Environment
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
*/
public function createTemplate($template, string $name = null)
public function createTemplate($template, $name = null)
{
$hash = hash('sha256', $template, false);
if (null !== $name) {
+1 -1
View File
@@ -47,7 +47,7 @@ use Twig\Template;
*
* @return Template
*/
function twig_template_from_string(Environment $env, $template, string $name = null)
function twig_template_from_string(Environment $env, $template, $name = null)
{
return $env->createTemplate((string) $template, $name);
}