From f5682e55c9526745a318b9c2187db8dc876c02e4 Mon Sep 17 00:00:00 2001 From: DonCallisto Date: Thu, 24 Aug 2017 16:59:27 +0200 Subject: [PATCH] Fix #976 --- Twig/DataGridExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Twig/DataGridExtension.php b/Twig/DataGridExtension.php index 77f37b1b..df4439f5 100644 --- a/Twig/DataGridExtension.php +++ b/Twig/DataGridExtension.php @@ -452,7 +452,7 @@ protected function getTemplatesFromString(Twig_Environment $environment, $theme) $this->templates = []; $template = $environment->loadTemplate($theme); - while ($template !== null) { + while ($template instanceof \Twig_Template) { $this->templates[] = $template; $template = $template->getParent([]); }