From 3793740ac5dc1ba70e8654e4d6627bdd61640566 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 18 Dec 2011 20:11:39 +0100 Subject: [PATCH] fixed dump function when the context contains Twig_Template instances --- lib/Twig/Extension/Debug.php | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/lib/Twig/Extension/Debug.php b/lib/Twig/Extension/Debug.php index d8891de..1a6644c 100644 --- a/lib/Twig/Extension/Debug.php +++ b/lib/Twig/Extension/Debug.php @@ -42,7 +42,14 @@ function twig_var_dump($context) $count = func_num_args(); if (1 === $count) { - var_dump($context); + $vars = array(); + foreach ($context as $key => $value) { + if (!$value instanceof Twig_Template) { + $vars[$key] = $value; + } + } + + var_dump($vars); } else { for ($i = 1; $i < $count; $i++) { var_dump(func_get_arg($i)); -- 1.7.2.5