From 08b4a73791ae0858850e469f98a4ebc2fd52f4db Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Pineau?= Date: Sun, 21 Apr 2013 16:30:55 +0200 Subject: [PATCH] Debug extension is safe in a cli context --- lib/Twig/Extension/Debug.php | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/Twig/Extension/Debug.php b/lib/Twig/Extension/Debug.php index 97007fb..e3a85bf 100644 --- a/lib/Twig/Extension/Debug.php +++ b/lib/Twig/Extension/Debug.php @@ -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 // xdebug.overload_var_dump produces HTML only when html_errors is also enabled && (false === ini_get('html_errors') || ini_get('html_errors')) + || 'cli' === php_sapi_name() ; return array( -- 1.7.2.5