From: Fabien Potencier Date: Sun, 18 Dec 2011 19:11:39 +0000 (+0100) Subject: fixed dump function when the context contains Twig_Template instances X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=3793740ac5dc1ba70e8654e4d6627bdd61640566;p=web%2Fkonrad%2Ftwig.git fixed dump function when the context contains Twig_Template instances --- 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));