From: Grégoire Pineau Date: Sun, 21 Apr 2013 14:30:55 +0000 (+0200) Subject: Debug extension is safe in a cli context X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=08b4a73791ae0858850e469f98a4ebc2fd52f4db;p=web%2Fkonrad%2Ftwig.git Debug extension is safe in a cli context --- 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(