From: Fabien Potencier Date: Sun, 18 Dec 2011 19:54:12 +0000 (+0100) Subject: fixed dump when xdebug.overload_var_dump is not defined in php.ini X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=6f020ccaf4d0c23a4c6c6e6e1bd21c79cac72f22;p=web%2Fkonrad%2Ftwig.git fixed dump when xdebug.overload_var_dump is not defined in php.ini --- 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)),