Skip to content

Commit 8fd1df9

Browse files
committed
making sure the date formats aren't empty
1 parent e1987c5 commit 8fd1df9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PatternLab/PatternEngine/Twig/TwigUtil.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public static function loadDateFormats($instance) {
2929
$dateFormat = Config::getOption("twigDefaultDateFormat");
3030
$intervalFormat = Config::getOption("twigDefaultIntervalFormat");
3131

32-
if ($dateFormat && $intervalFormat) {
33-
$instance->getExtension('core')->setDateFormat($dateFormat, $intervalFormat);
32+
if ($dateFormat && $intervalFormat && !empty($dateFormat) && !empty($intervalFormat)) {
33+
$instance->getExtension("core")->setDateFormat($dateFormat, $intervalFormat);
3434
}
3535

3636
return $instance;

0 commit comments

Comments
 (0)