mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 03:46:39 +00:00
fixed compat with PHP 5
This commit is contained in:
+1
-1
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user