From a65037650f29a635b3e8f70d5872afdb3e86b2b5 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 25 May 2010 04:18:00 +0000 Subject: [PATCH] BUGFIX #4572 Fixed Windows failure on SS_Cli::supports_colour() because posix functions are not supported (from r100560) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105604 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- dev/Cli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/Cli.php b/dev/Cli.php index 0932f233a..7165dd3a7 100644 --- a/dev/Cli.php +++ b/dev/Cli.php @@ -12,7 +12,7 @@ class SS_Cli extends Object { */ static function supports_colour() { if(!defined('STDOUT')) define('STDOUT', fopen("php://stdout","w")); - return @posix_isatty(STDOUT); + return function_exists('posix_isatty') ? @posix_isatty(STDOUT) : false; } /**