From 6f020ccaf4d0c23a4c6c6e6e1bd21c79cac72f22 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 18 Dec 2011 20:54:12 +0100 Subject: [PATCH] fixed dump when xdebug.overload_var_dump is not defined in php.ini --- lib/Twig/Extension/Debug.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/Twig/Extension/Debug.php b/lib/Twig/Extension/Debug.php index aaec125..aab7093 100644 --- a/lib/Twig/Extension/Debug.php +++ b/lib/Twig/Extension/Debug.php @@ -18,7 +18,7 @@ class Twig_Extension_Debug extends Twig_Extension public function getFunctions() { // dump is safe if var_dump is overriden by xdebug - $isDumpOutputHtmlSafe = extension_loaded('xdebug') && get_cfg_var('xdebug.overload_var_dump') && get_cfg_var('html_errors'); + $isDumpOutputHtmlSafe = extension_loaded('xdebug') && (false === get_cfg_var('xdebug.overload_var_dump') || get_cfg_var('xdebug.overload_var_dump')) && get_cfg_var('html_errors'); return array( 'dump' => new Twig_Function_Function('twig_var_dump', array('is_safe' => $isDumpOutputHtmlSafe ? array('html') : array(), 'needs_context' => true, 'needs_environment' => true)), -- 1.7.2.5