fix: global namespace

This commit is contained in:
Matthieu Bessat 2022-08-02 22:18:19 +02:00
parent 7e6a7d47d6
commit a189fd1f3b

View file

@ -42,7 +42,7 @@ return [
$twig->getEnvironment()->addFilter(new \Twig\TwigFilter('formatDate', function (\Twig\Environment $env, $inp) use ($container) { $twig->getEnvironment()->addFilter(new \Twig\TwigFilter('formatDate', function (\Twig\Environment $env, $inp) use ($container) {
$locale = $env->getGlobals()['locale']; $locale = $env->getGlobals()['locale'];
$formatter = new IntlDateFormatter($locale); $formatter = new \IntlDateFormatter($locale);
if ($inp instanceof \DateTime) { if ($inp instanceof \DateTime) {
$d = $inp; $d = $inp;
} else { } else {