From e10b98b1e9f3f6ade9df5cab085231107a9056f6 Mon Sep 17 00:00:00 2001 From: CamaroSS Date: Mon, 15 Jun 2015 17:09:49 +0300 Subject: [PATCH] Fixed: some strings and arrays in the context can break the template rendering due to PHP callables --- dja/template/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dja/template/base.php b/dja/template/base.php index 3d4f45e..678e53e 100644 --- a/dja/template/base.php +++ b/dja/template/base.php @@ -1599,7 +1599,7 @@ private function resolveLookup($context) { } } - if (is_callable($current)) { + if (is_callable($current) && !is_string($current) && !is_array($current)) { if (py_getattr($current, 'do_not_call_in_templates', False)) { } elseif (py_getattr($current, 'alters_data', False)) { $current = Dja::getSetting('TEMPLATE_STRING_IF_INVALID');