From 96f99a16efd5407aaf6779865ea67a121b58a291 Mon Sep 17 00:00:00 2001 From: clickalicious GmbH Date: Mon, 10 Aug 2015 22:44:24 +0200 Subject: [PATCH] Bugfix: PHP on internal webserver + win + env ANSICON set This fixes a bug with formatted output (formatted for CLI instead Web) when running PHP on internal webserver on windows with having ANSICON set. --- Dumper/CliDumper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dumper/CliDumper.php b/Dumper/CliDumper.php index 1fcad90c..06818517 100644 --- a/Dumper/CliDumper.php +++ b/Dumper/CliDumper.php @@ -58,7 +58,7 @@ public function __construct($output = null, $charset = null) { parent::__construct($output, $charset); - if ('\\' === DIRECTORY_SEPARATOR && false !== @getenv('ANSICON')) { + if ('\\' === DIRECTORY_SEPARATOR && false !== @getenv('ANSICON') && 'cli' === PHP_SAPI) { // Use only the base 16 xterm colors when using ANSICON $this->setStyles(array( 'default' => '31',