Revision 1852
Added by darkviper over 11 years ago
Debug.php | ||
---|---|---|
17 | 17 |
*/ |
18 | 18 |
public function getFunctions() |
19 | 19 |
{ |
20 |
// dump is safe if var_dump is overriden by xdebug |
|
21 |
$isDumpOutputHtmlSafe = extension_loaded('xdebug') && (false === get_cfg_var('xdebug.overload_var_dump') || get_cfg_var('xdebug.overload_var_dump')) && get_cfg_var('html_errors'); |
|
20 |
// dump is safe if var_dump is overridden by xdebug |
|
21 |
$isDumpOutputHtmlSafe = extension_loaded('xdebug') |
|
22 |
// false means that it was not set (and the default is on) or it explicitly enabled |
|
23 |
&& (false === ini_get('xdebug.overload_var_dump') || ini_get('xdebug.overload_var_dump')) |
|
24 |
// false means that it was not set (and the default is on) or it explicitly enabled |
|
25 |
// xdebug.overload_var_dump produces HTML only when html_errors is also enabled |
|
26 |
&& (false === ini_get('html_errors') || ini_get('html_errors')) |
|
27 |
; |
|
22 | 28 |
|
23 | 29 |
return array( |
24 | 30 |
'dump' => new Twig_Function_Function('twig_var_dump', array('is_safe' => $isDumpOutputHtmlSafe ? array('html') : array(), 'needs_context' => true, 'needs_environment' => true)), |
Also available in: Unified diff
updated Twig template engine to stable version 1.11.1 step2