Debug extension is safe in a cli context

This commit is contained in:
Grégoire Pineau
2013-04-21 16:30:55 +02:00
parent 80fd11cbbe
commit 08b4a73791
+1
View File
@@ -24,6 +24,7 @@ class Twig_Extension_Debug extends Twig_Extension
// false means that it was not set (and the default is on) or it explicitly enabled // false means that it was not set (and the default is on) or it explicitly enabled
// xdebug.overload_var_dump produces HTML only when html_errors is also enabled // xdebug.overload_var_dump produces HTML only when html_errors is also enabled
&& (false === ini_get('html_errors') || ini_get('html_errors')) && (false === ini_get('html_errors') || ini_get('html_errors'))
|| 'cli' === php_sapi_name()
; ;
return array( return array(